Skip to content

Commit cc65445

Browse files
author
Yair Aichenbaum
committed
Fixed merge conflicts
1 parent 2aeab09 commit cc65445

File tree

2 files changed

+75
-201
lines changed

2 files changed

+75
-201
lines changed

Files/UserControls/Sidebar.xaml.cs

-17
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,6 @@ public Sidebar()
4646

4747
}
4848

49-
private INavigationControlItem _SelectedSidebarItem;
50-
public INavigationControlItem SelectedSidebarItem
51-
{
52-
get
53-
{
54-
return _SelectedSidebarItem;
55-
}
56-
set
57-
{
58-
if (value != _SelectedSidebarItem)
59-
{
60-
_SelectedSidebarItem = value;
61-
NotifyPropertyChanged("SelectedSidebarItem");
62-
}
63-
}
64-
}
65-
6649
public event PropertyChangedEventHandler PropertyChanged;
6750
private void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
6851
{

Files/Views/InstanceTabsView.xaml

+75-184
Original file line numberDiff line numberDiff line change
@@ -5,210 +5,101 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:local="using:Files"
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8-
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives"
98
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
9+
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives"
1010
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
1111
mc:Ignorable="d">
12-
<Page.Resources>
13-
<Style x:Name="TabViewButtonStyle1" TargetType="Button">
14-
<Setter Property="Background" Value="{ThemeResource TabViewItemHeaderBackground}" />
15-
<Setter Property="Foreground" Value="{ThemeResource SystemControlBackgroundBaseMediumBrush}" />
16-
<Setter Property="CornerRadius" Value="{Binding Converter={StaticResource TopCornerRadiusFilterConverter}, Source={ThemeResource OverlayCornerRadius}}" />
17-
<Setter Property="FontSize" Value="11" />
18-
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
19-
<Setter Property="VerticalAlignment" Value="Bottom" />
20-
<Setter Property="Margin" Value="0,7,0,0" />
21-
<Setter Property="Padding" Value="10,10,10,11" />
22-
<Setter Property="Template">
23-
<Setter.Value>
24-
<ControlTemplate TargetType="Button">
25-
<ContentPresenter
26-
x:Name="ContentPresenter"
27-
Padding="{TemplateBinding Padding}"
28-
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
29-
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
30-
AutomationProperties.AccessibilityView="Raw"
31-
Background="{TemplateBinding Background}"
32-
Content="{TemplateBinding Content}"
33-
ContentTemplate="{TemplateBinding ContentTemplate}"
34-
ContentTransitions="{TemplateBinding ContentTransitions}"
35-
CornerRadius="{TemplateBinding CornerRadius}"
36-
FontFamily="{TemplateBinding FontFamily}"
37-
FontSize="{TemplateBinding FontSize}"
38-
FontWeight="SemiLight">
39-
<VisualStateManager.VisualStateGroups>
40-
<VisualStateGroup x:Name="CommonStates">
41-
<VisualState x:Name="Normal">
42-
<Storyboard>
43-
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
44-
</Storyboard>
45-
</VisualState>
46-
<VisualState x:Name="PointerOver">
47-
<Storyboard>
48-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
49-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewItemHeaderBackgroundPointerOver}" />
50-
</ObjectAnimationUsingKeyFrames>
51-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
52-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundBaseMediumHighBrush}" />
53-
</ObjectAnimationUsingKeyFrames>
54-
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
55-
</Storyboard>
56-
</VisualState>
57-
<VisualState x:Name="Pressed">
58-
<Storyboard>
59-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
60-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TabViewItemHeaderBackgroundPressed}" />
61-
</ObjectAnimationUsingKeyFrames>
62-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
63-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundBaseMediumHighBrush}" />
64-
</ObjectAnimationUsingKeyFrames>
65-
<PointerDownThemeAnimation Storyboard.TargetName="ContentPresenter" />
66-
</Storyboard>
67-
</VisualState>
68-
<VisualState x:Name="Disabled">
69-
<Storyboard>
70-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background">
71-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundDisabled}" />
72-
</ObjectAnimationUsingKeyFrames>
73-
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
74-
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundDisabled}" />
75-
</ObjectAnimationUsingKeyFrames>
76-
</Storyboard>
77-
</VisualState>
78-
</VisualStateGroup>
79-
</VisualStateManager.VisualStateGroups>
80-
</ContentPresenter>
81-
</ControlTemplate>
82-
</Setter.Value>
83-
</Setter>
84-
</Style>
85-
<Style x:Key="TabViewStyleFluent" TargetType="muxc:TabView">
86-
<Setter Property="VerticalAlignment" Value="Top" />
87-
<Setter Property="Padding" Value="{ThemeResource TabViewHeaderPadding}" />
88-
<Setter Property="IsTabStop" Value="False" />
89-
<Setter Property="Background" Value="{ThemeResource BackgroundAcrylicBrush}" />
90-
<Setter Property="Template">
91-
<Setter.Value>
92-
<ControlTemplate TargetType="muxc:TabView">
93-
<Grid>
94-
<Grid.RowDefinitions>
95-
<RowDefinition Height="Auto" />
96-
<RowDefinition Height="*" />
97-
</Grid.RowDefinitions>
98-
<Grid
99-
x:Name="TabContainerGrid"
100-
Background="{TemplateBinding Background}"
101-
XYFocusKeyboardNavigation="Enabled">
102-
<Grid.ColumnDefinitions>
103-
<ColumnDefinition x:Name="LeftContentColumn" Width="Auto" />
104-
<ColumnDefinition x:Name="TabColumn" Width="Auto" />
105-
<ColumnDefinition x:Name="AddButtonColumn" Width="Auto" />
106-
<ColumnDefinition
107-
x:Name="RightContentColumn"
108-
Width="*"
109-
MinWidth="175" />
110-
<ColumnDefinition x:Name="CaptionButtonColumn" Width="175" />
111-
</Grid.ColumnDefinitions>
112-
<ContentPresenter
113-
x:Name="LeftContentPresenter"
114-
Grid.Column="0"
115-
Content="{TemplateBinding TabStripHeader}"
116-
ContentTemplate="{TemplateBinding TabStripHeaderTemplate}" />
117-
<Grid x:Name="ShadowReceiver" Grid.ColumnSpan="5" />
118-
<primitives:TabViewListView
119-
x:Name="TabListView"
120-
Grid.Column="1"
121-
Padding="{x:Bind local:InstanceTabsView.WindowProperties.TabListPadding, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
122-
VerticalAlignment="Stretch"
123-
AllowDrop="{TemplateBinding AllowDropTabs}"
124-
CanDragItems="{TemplateBinding CanDragTabs}"
125-
CanReorderItems="{TemplateBinding CanReorderTabs}"
126-
ItemTemplate="{TemplateBinding TabItemTemplate}"
127-
ItemTemplateSelector="{TemplateBinding TabItemTemplateSelector}"
128-
ItemsSource="{TemplateBinding TabItemsSource}">
129-
<primitives:TabViewListView.ItemContainerTransitions>
130-
<TransitionCollection>
131-
<ReorderThemeTransition />
132-
</TransitionCollection>
133-
</primitives:TabViewListView.ItemContainerTransitions>
134-
</primitives:TabViewListView>
135-
<Button
136-
x:Name="AddButton"
137-
Grid.Column="2"
138-
Margin="{x:Bind local:InstanceTabsView.WindowProperties.TabAddButtonMargin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
139-
VerticalAlignment="Stretch"
140-
Command="{TemplateBinding AddTabButtonCommand}"
141-
CommandParameter="{TemplateBinding AddTabButtonCommandParameter}"
142-
Content="&#xE710;"
143-
IsTextScaleFactorEnabled="False"
144-
Style="{StaticResource TabViewButtonStyle1}"
145-
Visibility="{Binding IsAddTabButtonVisible, RelativeSource={RelativeSource Mode=TemplatedParent}}">
146-
<Button.KeyboardAccelerators>
147-
<KeyboardAccelerator Key="T" Modifiers="Control" />
148-
</Button.KeyboardAccelerators>
149-
</Button>
150-
<ContentPresenter
151-
x:Name="RightContentPresenter"
152-
Grid.Column="3"
153-
HorizontalAlignment="Stretch"
154-
Content="{TemplateBinding TabStripFooter}"
155-
ContentTemplate="{TemplateBinding TabStripFooterTemplate}" />
156-
</Grid>
157-
<Grid
158-
x:Name="ShadowCaster"
159-
Grid.Row="0"
160-
Height="10"
161-
Margin="0,0,0,-10"
162-
VerticalAlignment="Bottom"
163-
Background="Transparent" />
164-
<ContentPresenter
165-
x:Name="TabContentPresenter"
166-
Grid.Row="1"
167-
BorderBrush="{TemplateBinding BorderBrush}"
168-
BorderThickness="{TemplateBinding BorderThickness}"
169-
ContentTransitions="{x:Null}" />
170-
</Grid>
171-
</ControlTemplate>
172-
</Setter.Value>
173-
</Setter>
174-
</Style>
175-
</Page.Resources>
17612

17713
<Grid x:Name="rootGrid" Background="Transparent">
17814
<muxc:TabView
17915
x:Name="TabStrip"
180-
Grid.Row="0"
18116
VerticalAlignment="Stretch"
18217
x:FieldModifier="public"
183-
AddTabButtonClick="TabStrip_AddTabButtonClick"
18+
Background="Transparent"
19+
IsAddTabButtonVisible="False"
18420
SelectionChanged="TabStrip_SelectionChanged"
185-
Style="{ThemeResource TabViewStyleFluent}"
18621
TabCloseRequested="TabStrip_TabCloseRequested"
18722
TabWidthMode="Equal">
18823
<muxc:TabView.Resources>
189-
<StaticResource x:Key="TabViewItemHeaderBackgroundSelected" ResourceKey="RibbonBackgroundColor" />
24+
<StaticResource x:Key="TabViewItemHeaderBackgroundSelected" ResourceKey="ApplicationPageBackgroundThemeBrush" />
25+
<Thickness x:Key="TabViewHeaderPadding">0,0,0,0</Thickness>
19026
</muxc:TabView.Resources>
27+
<muxc:TabView.TabStripHeader>
28+
<Grid
29+
x:Name="DragArea2"
30+
Width="200"
31+
Background="Transparent"
32+
Visibility="{x:Bind local:App.InteractionViewModel.LeftMarginLoaded, Mode=OneWay}" />
33+
</muxc:TabView.TabStripHeader>
19134
<muxc:TabView.TabStripFooterTemplate>
19235
<DataTemplate>
193-
<Grid
194-
x:Name="DragArea"
195-
MinWidth="175"
196-
Background="Transparent"
197-
Loaded="DragArea_Loaded" />
36+
<Grid>
37+
<Grid.ColumnDefinitions>
38+
<ColumnDefinition Width="Auto" />
39+
<ColumnDefinition Width="*" />
40+
</Grid.ColumnDefinitions>
41+
<Button
42+
x:Name="AddTabButton"
43+
Width="28"
44+
Height="28"
45+
Margin="2,0"
46+
Background="Transparent"
47+
Click="AddTabButton_Click">
48+
<Button.Content>
49+
<FontIcon FontSize="10" Glyph="&#xE710;" />
50+
</Button.Content>
51+
<Button.KeyboardAccelerators>
52+
<KeyboardAccelerator Key="T" Modifiers="Control" />
53+
</Button.KeyboardAccelerators>
54+
</Button>
55+
<Grid
56+
x:Name="DragArea"
57+
Grid.Column="1"
58+
MinWidth="175"
59+
Background="Transparent"
60+
Loaded="DragArea_Loaded" />
61+
</Grid>
19862
</DataTemplate>
19963
</muxc:TabView.TabStripFooterTemplate>
20064
<muxc:TabView.KeyboardAccelerators>
201-
<KeyboardAccelerator Key="Number1" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
202-
<KeyboardAccelerator Key="Number2" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
203-
<KeyboardAccelerator Key="Number3" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
204-
<KeyboardAccelerator Key="Number4" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
205-
<KeyboardAccelerator Key="Number5" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
206-
<KeyboardAccelerator Key="Number6" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
207-
<KeyboardAccelerator Key="Number7" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
208-
<KeyboardAccelerator Key="Number8" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
209-
<KeyboardAccelerator Key="Number9" Modifiers="Control" Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked" />
65+
<KeyboardAccelerator
66+
Key="Number1"
67+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
68+
Modifiers="Control" />
69+
<KeyboardAccelerator
70+
Key="Number2"
71+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
72+
Modifiers="Control" />
73+
<KeyboardAccelerator
74+
Key="Number3"
75+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
76+
Modifiers="Control" />
77+
<KeyboardAccelerator
78+
Key="Number4"
79+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
80+
Modifiers="Control" />
81+
<KeyboardAccelerator
82+
Key="Number5"
83+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
84+
Modifiers="Control" />
85+
<KeyboardAccelerator
86+
Key="Number6"
87+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
88+
Modifiers="Control" />
89+
<KeyboardAccelerator
90+
Key="Number7"
91+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
92+
Modifiers="Control" />
93+
<KeyboardAccelerator
94+
Key="Number8"
95+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
96+
Modifiers="Control" />
97+
<KeyboardAccelerator
98+
Key="Number9"
99+
Invoked="NavigateToNumberedTabKeyboardAccelerator_Invoked"
100+
Modifiers="Control" />
210101
</muxc:TabView.KeyboardAccelerators>
211102

212103
</muxc:TabView>
213104
</Grid>
214-
</Page>
105+
</Page>

0 commit comments

Comments
 (0)