优化RecipeEditor滚动方式,取消实时滚动以减缓卡顿。
This commit is contained in:
parent
ee614cc2e8
commit
cf78fc0eb0
|
@ -55,7 +55,7 @@
|
|||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ScrollViewer Name="DG_ScrollViewer" Focusable="false">
|
||||
<ScrollViewer Name="DG_ScrollViewer" Focusable="false" IsDeferredScrollingEnabled="True">
|
||||
<ScrollViewer.Template>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
|
@ -325,7 +325,7 @@
|
|||
Storyboard.TargetProperty= "Opacity"
|
||||
From="0"
|
||||
To="1"
|
||||
Duration="0:0:1.0" AutoReverse="False"/>
|
||||
Duration="0:0:0.300" AutoReverse="False"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
|
|
|
@ -1529,6 +1529,7 @@
|
|||
Width="{Binding ElementName=dgContainer, Path=Height}"
|
||||
Height="{Binding ElementName=dgContainer, Path=Width}"
|
||||
SelectedItemsList="{Binding SelectedRecipeSteps, Mode=OneWayToSource, Converter={StaticResource SelectedRecipeStepsToList}}"
|
||||
ItemsSource="{Binding CurrentRecipe.Steps}"
|
||||
LoadingRow="DgCustom_OnLoadingRow"
|
||||
UnloadingRow="DgCustom_OnUnloadingRow"
|
||||
BeginningEdit="DgCustom_OnBeginningEdit">
|
||||
|
|
|
@ -481,7 +481,7 @@ namespace SicUI.Models.RecipeEditors
|
|||
|
||||
});
|
||||
|
||||
u.dgCustom.ItemsSource = CurrentRecipe.Steps;
|
||||
//u.dgCustom.ItemsSource = CurrentRecipe.Steps;
|
||||
u.dgCustom.LostFocus += DgCustom_LostFocus;
|
||||
u.dgCustom.CellEditEnding += DgCustomOnCellEditEnding;
|
||||
u.dgCustom.LoadingRow += DgCustomOnLoadingRow;
|
||||
|
|
Loading…
Reference in New Issue