Browse Source

禁用滚动条右键菜单

master
wugang 7 years ago
parent
commit
d9b30b663c
2 changed files with 12 additions and 2 deletions
  1. +2
    -2
      CowOutputClient/OperateWindow.xaml
  2. +10
    -0
      CowOutputClient/OperateWindow.xaml.cs

+ 2
- 2
CowOutputClient/OperateWindow.xaml View File

@ -16,7 +16,7 @@
<RadioButton x:Name="rbFixedNum" GroupName="W" FontSize="17" Margin="0,0,0,0">固定数量双计量</RadioButton>
<RadioButton x:Name="rbSelectedNum" GroupName="W" FontSize="17" Margin="0,0,0,0">选数双计量</RadioButton>
</StackPanel>
<ScrollViewer x:Name="scrList2" Margin="30,150,0,0" VerticalScrollBarVisibility="Auto" Width="350" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top">
<ScrollViewer x:Name="scrList2" ContextMenuOpening="scrList2_ContextMenuOpening_1" Margin="30,150,0,0" VerticalScrollBarVisibility="Auto" Width="350" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top">
<WrapPanel Name="ProductCatalogPanel" ItemHeight="45" ItemWidth="110" Margin="0" Width="{Binding ElementName=scrList, Path=Width, Mode=OneWay}" >
<!--<Button Focusable="False" Content="鲜品" Name="btn4" FontSize="20" Margin="10,10,0,0" />
<Button Focusable="False" Content="鲜品" Name="btn3" FontSize="20" Margin="10,10,0,0" />
@ -33,7 +33,7 @@
<Grid Name="Grid1" Margin="30,260,0,0" Width="350" Height="480" HorizontalAlignment="Left" VerticalAlignment="Top">
<Border BorderThickness="1" BorderBrush="Black">
</Border>
<ScrollViewer x:Name="scrList" Margin="0" VerticalScrollBarVisibility="Auto">
<ScrollViewer x:Name="scrList" Margin="0" VerticalScrollBarVisibility="Auto" ContextMenuOpening="scrList_ContextMenuOpening_1">
<!--<WrapPanel Name="CatalogDetails" ItemHeight="45" ItemWidth="110" Width="350" Height="540" >-->
<WrapPanel Name="CatalogDetails" ItemHeight="50" ItemWidth="160" Margin="0" Width="{Binding ElementName=scrList, Path=Width, Mode=OneWay}">


+ 10
- 0
CowOutputClient/OperateWindow.xaml.cs View File

@ -586,5 +586,15 @@ namespace CowOutputClient
gridWeightInfo.SelectedIndex = -1;
}
}
private void scrList2_ContextMenuOpening_1(object sender, ContextMenuEventArgs e)
{
e.Handled = true;
}
private void scrList_ContextMenuOpening_1(object sender, ContextMenuEventArgs e)
{
e.Handled = true;
}
}
}

Loading…
Cancel
Save