-
Notifications
You must be signed in to change notification settings - Fork 672
Adding accessible context menus to TabView pages #1664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
89305ac
12b88ce
37f1d85
877a3da
41a2ee9
2cbeafb
4d54d7f
1e68b61
5c250f5
a93ef9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
<TextBlock Text="{Binding}" Style="{ThemeResource TitleTextBlockStyle}" /> | ||
<TextBlock Text="Drag the Tab outside of the window to spawn a new window." Style="{ThemeResource SubtitleTextBlockStyle}" /> | ||
<TextBlock Text="Notice that the state of the Tab is maintained in the new window. For example, if you toggle the ToggleSwitch ON, it will remain ON in the new window." Style="{ThemeResource BodyTextBlockStyle}" /> | ||
<ToggleSwitch x:Name="ControlToggle" Header="Turn on ProgressRing" Margin="0,8" /> | ||
<ProgressRing IsActive="{x:Bind ControlToggle.IsOn, Mode=OneWay}" HorizontalAlignment="Left" /> | ||
<ToggleSwitch x:Name="ControlToggle" Header="Turn on ProgressRing" Margin="0,8" IsOn="{x:Bind IsInProgress, Mode=TwoWay}" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am unclear on why this change is being made & net impact on UX. Can you explain or add screenshot in PR Description. |
||
<ProgressRing IsActive="{x:Bind IsInProgress, Mode=OneWay}" HorizontalAlignment="Left" /> | ||
</StackPanel> | ||
</UserControl> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,22 +9,36 @@ | |
mc:Ignorable="d"> | ||
|
||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> | ||
<TabView | ||
x:Name="Tabs" | ||
VerticalAlignment="Stretch" | ||
AddTabButtonClick="Tabs_AddTabButtonClick" | ||
CanTearOutTabs="True" | ||
ExternalTornOutTabsDropped="Tabs_ExternalTornOutTabsDropped" | ||
ExternalTornOutTabsDropping="Tabs_ExternalTornOutTabsDropping" | ||
TabCloseRequested="Tabs_TabCloseRequested" | ||
TabTearOutRequested="Tabs_TabTearOutRequested" | ||
TabTearOutWindowRequested="Tabs_TabTearOutWindowRequested"> | ||
<TabView | ||
x:Name="Tabs" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you fix indentation and why order of event subscription being changed for all the items (only diff seems addition of |
||
VerticalAlignment="Stretch" | ||
AddTabButtonClick="Tabs_AddTabButtonClick" | ||
TabCloseRequested="Tabs_TabCloseRequested" | ||
CanTearOutTabs="True" | ||
TabTearOutWindowRequested="Tabs_TabTearOutWindowRequested" | ||
TabTearOutRequested="Tabs_TabTearOutRequested" | ||
ExternalTornOutTabsDropping="Tabs_ExternalTornOutTabsDropping" | ||
ExternalTornOutTabsDropped="Tabs_ExternalTornOutTabsDropped" | ||
TabItemsSource="{x:Bind TabItemDataList}"> | ||
<TabView.TabStripHeader> | ||
<Grid x:Name="ShellTitleBarInset" Background="Transparent" /> | ||
</TabView.TabStripHeader> | ||
<TabView.TabStripFooter> | ||
<Grid x:Name="CustomDragRegion" Background="Transparent" /> | ||
</TabView.TabStripFooter> | ||
<TabView.TabItemTemplate> | ||
<DataTemplate x:DataType="local:TabItemData"> | ||
<TabViewItem Header="{x:Bind Header}"> | ||
<TabViewItem.ContextFlyout> | ||
<MenuFlyout Opening="TabViewContextMenu_Opening" /> | ||
</TabViewItem.ContextFlyout> | ||
<TabViewItem.IconSource> | ||
<SymbolIconSource Symbol="Placeholder" /> | ||
</TabViewItem.IconSource> | ||
<local:TabContentSampleControl DataContext="{x:Bind Content}" IsInProgress="{x:Bind IsInProgress, Mode=TwoWay}" /> | ||
</TabViewItem> | ||
</DataTemplate> | ||
</TabView.TabItemTemplate> | ||
</TabView> | ||
</Grid> | ||
</Page> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's behavior of this function that we want (not current behavior) when current DO is of type
T
and it has a parent of typeT
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is reasonable to return the first result, otherwise you would need to scan up to the root to find the latest T