Skip to content
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

Fixed Application Menu Item: IsSplited="True" Gray line issue #121

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions Fluent/Themes/Office2010/Controls/ApplicationMenuItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -875,14 +875,25 @@
Visibility="Hidden"
HorizontalAlignment="Left" />
<TextBlock x:Name="textBlock"
Text="{TemplateBinding Header}"
Width="Auto"
Height="Auto"
Margin="9,3,3,3"
VerticalAlignment="Center"
Grid.Column="1"
d:LayoutOverrides="Width"
TextTrimming="CharacterEllipsis" />
TextTrimming="CharacterEllipsis"
ToolTip="{TemplateBinding ToolTip}">
<InlineUIContainer>
<Grid Width="{Binding RelativeSource={RelativeSource AncestorType=TextBlock},Path=ActualWidth}">
<TextBlock Text="{TemplateBinding Header}"/>
<TextBlock Text="{TemplateBinding Description}" TextAlignment="Right" />
</Grid>
</InlineUIContainer>
</TextBlock>
<Rectangle Grid.Column="2"
HorizontalAlignment="Right"
Margin="0,4,23,4"
Width="0" />
<Rectangle x:Name="rectangle"
Fill="{DynamicResource MenuItemCheckBoxBackgroundBrush}"
Stroke="{DynamicResource MenuItemCheckBoxBorderBrush}"
Expand Down Expand Up @@ -1571,16 +1582,6 @@
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Path Fill="{x:Null}"
Stretch="Fill"
Stroke="#FFE2E4E7"
HorizontalAlignment="Left"
Margin="24,0,0,0"
Width="1"
Height="Auto"
Data="M0,0L0,1"
Grid.RowSpan="2"
Visibility="Visible" />
<ScrollViewer Margin="1"
x:Name="PART_ScrollViewer"
Style="{DynamicResource MenuScrollViewer}"
Expand Down
12 changes: 10 additions & 2 deletions Fluent/Themes/Office2010/Controls/QuickAccessToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,18 @@
<Separator x:Name="menuSeparator"
Style="{DynamicResource MenuSeparatorStyle}" />
<Fluent:MenuItem x:Name="PART_ShowBelow"
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowBelow, Mode=OneWay}" />
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowBelow, Mode=OneWay}" >
<Fluent:MenuItem.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Fluent:MenuItem.ContextMenu>
</Fluent:MenuItem>
<Fluent:MenuItem x:Name="PART_ShowAbove"
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowAbove, Mode=OneWay}"
Visibility="Collapsed" />
Visibility="Collapsed" >
<Fluent:MenuItem.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Fluent:MenuItem.ContextMenu>
</Fluent:MenuItem>
</Fluent:DropDownButton>
</ContentControl>
<Fluent:DropDownButton x:Name="PART_ToolbarDownButton"
Expand Down
12 changes: 10 additions & 2 deletions Fluent/Themes/Office2010/Controls/RibbonTabControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
VerticalAlignment="Center"
Source="/Fluent;Component/Themes/Office2010/Images/RibbonCollapse.png"
Width="Auto"
Margin="2" />
Margin="2" >
<Image.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Image.ContextMenu>
</Image>
<Image x:Name="iconImageChecked"
Visibility="Collapsed"
HorizontalAlignment="Center"
Expand All @@ -44,7 +48,11 @@
VerticalAlignment="Center"
Source="/Fluent;Component/Themes/Office2010/Images/RibbonExpand.png"
Width="Auto"
Margin="2" />
Margin="2" >
<Image.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Image.ContextMenu>
</Image>
</Grid>
</Border>
</Border>
Expand Down
12 changes: 10 additions & 2 deletions Fluent/Themes/Office2013/Controls/QuickAccessToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,18 @@
<Separator x:Name="menuSeparator"
Style="{DynamicResource MenuSeparatorStyle}" />
<Fluent:MenuItem x:Name="PART_ShowBelow"
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowBelow, Mode=OneWay}" />
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowBelow, Mode=OneWay}" >
<Fluent:MenuItem.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Fluent:MenuItem.ContextMenu>
</Fluent:MenuItem>
<Fluent:MenuItem x:Name="PART_ShowAbove"
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowAbove, Mode=OneWay}"
Visibility="Collapsed" />
Visibility="Collapsed" >
<Fluent:MenuItem.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Fluent:MenuItem.ContextMenu>
</Fluent:MenuItem>
</Fluent:DropDownButton>
</ContentControl>
<Fluent:DropDownButton x:Name="PART_ToolbarDownButton"
Expand Down
12 changes: 10 additions & 2 deletions Fluent/Themes/Office2013/Controls/RibbonTabControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
VerticalAlignment="Center"
Source="/Fluent;Component/Themes/Office2010/Images/RibbonCollapse.png"
Width="Auto"
Margin="2" />
Margin="2" >
<Image.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Image.ContextMenu>
</Image>
<Image x:Name="iconImageChecked"
Visibility="Collapsed"
HorizontalAlignment="Center"
Expand All @@ -42,7 +46,11 @@
VerticalAlignment="Center"
Source="/Fluent;Component/Themes/Office2010/Images/RibbonExpand.png"
Width="Auto"
Margin="2" />
Margin="2" >
<Image.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Image.ContextMenu>
</Image>
</Grid>
</Border>
</Border>
Expand Down
12 changes: 10 additions & 2 deletions Fluent/Themes/Windows8/Controls/QuickAccessToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,18 @@
<Separator x:Name="menuSeparator"
Style="{DynamicResource MenuSeparatorStyle}" />
<Fluent:MenuItem x:Name="PART_ShowBelow"
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowBelow, Mode=OneWay}" />
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowBelow, Mode=OneWay}" >
<Fluent:MenuItem.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Fluent:MenuItem.ContextMenu>
</Fluent:MenuItem>
<Fluent:MenuItem x:Name="PART_ShowAbove"
Header="{Binding Source={x:Static Fluent:Ribbon.Localization}, Path=QuickAccessToolBarMenuShowAbove, Mode=OneWay}"
Visibility="Collapsed" />
Visibility="Collapsed" >
<Fluent:MenuItem.ContextMenu>
<ContextMenu Visibility="Hidden"/>
</Fluent:MenuItem.ContextMenu>
</Fluent:MenuItem>
</Fluent:DropDownButton>
</ContentControl>
<Fluent:DropDownButton x:Name="PART_ToolbarDownButton"
Expand Down
19 changes: 13 additions & 6 deletions FluentTest/TestContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,16 @@

</StackPanel>

<Fluent:MenuItem Header="File 1"
<Fluent:MenuItem Header="File 1 (with Tooltip)"
Icon="pack://application:,,,/FluentTest;component/Images/BlueLarge.png"
IsDefinitive="True">
IsDefinitive="True" SizeDefinition="Small"
ToolTip="C:\\File1WithTooltip.doc">
</Fluent:MenuItem>

<Fluent:MenuItem Header="File 2"
<Fluent:MenuItem Header="File 2 (with description)"
Icon="pack://application:,,,/FluentTest;component/Images/BlueLarge.png"
IsDefinitive="True" />
IsDefinitive="True"
Description="C:\\File2.txt" />

<Fluent:MenuItem Header="File 3"
Icon="pack://application:,,,/FluentTest;component/Images/BlueLarge.png"
Expand Down Expand Up @@ -283,10 +285,15 @@

</Fluent:MenuItem>

<Fluent:MenuItem Header="Open"
Icon="pack://application:,,,/FluentTest;component/Images/YellowLarge.png" />
<Fluent:MenuItem Header="Open (Has CanAddToQuickAccessToolBar set to False)"
Icon="pack://application:,,,/FluentTest;component/Images/YellowLarge.png"
CanAddToQuickAccessToolBar="False"/>

<Separator />
<Fluent:MenuItem Header="Close"
Icon="pack://application:,,,/FluentTest;component/Images/YellowLarge.png"
Description="Ctrl+E"
<Separator />

<Fluent:MenuItem Header="Exit"
Icon="pack://application:,,,/FluentTest;component/Images/RedLarge.png"
Expand Down