窗口边缘的小型可控区域控件

时间:2016-10-17 14:11:11

标签: c# .net wpf xaml mahapps.metro

我正在使用MahApps.Metro 1.3.0并且在窗口边缘有一个较小的可点击控件区域的问题,但如果我将它们从窗口边缘移开,可点击区域会恢复正常

有什么方法可以解决这个问题吗?

我的scrollviewer xaml:

<ScrollViewer x:Name="ScrollViewer" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto">
<ItemsControl x:Name="DocumentList" ItemsSource="{Binding Source={StaticResource Documents}}" BorderBrush="{x:Null}" ScrollViewer.CanContentScroll="False" Margin="0,0,0,1">
    <ItemsControl.ItemTemplate>
        <DataTemplate>
            <TextBlock>
                <Hyperlink Command="{Binding DataContext.OpenCommand, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" CommandParameter="{Binding UNID}"> 
                    <InlineUIContainer>
                        <TextBlock Text="{Binding DisplayName}" />
                    </InlineUIContainer>
                </Hyperlink>
            </TextBlock>
        </DataTemplate>
    </ItemsControl.ItemTemplate>

    <ItemsControl.GroupStyle>
        <GroupStyle>
            <GroupStyle.ContainerStyle>
                <Style TargetType="{x:Type GroupItem}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Expander Header="{Binding Name}" IsExpanded="False">
                                    <ItemsPresenter />
                                </Expander>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </GroupStyle.ContainerStyle>
        </GroupStyle>
    </ItemsControl.GroupStyle>
</ItemsControl>
</ScrollViewer>

我的窗口xaml:

<Controls:MetroWindow x:Class="MainWindow"
Name="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
BorderBrush="{DynamicResource AccentColorBrush}" BorderThickness="1 0 1 1"
Title="" Height="318" Width="526"
ShowIconOnTitleBar="False"
ResizeMode="NoResize"
Cursor="{Binding Cursor}"
NonActiveWindowTitleBrush="{StaticResource InactiveBlueColorBrush}">

0 个答案:

没有答案