首页 > 慧问 > 频道

一些大的Excel文件读取时会出现内存溢出异常的现象

发表于2019-05-10 回复:0 查看:2367  |  
保存使用中的LightCells非常不错,但我真的想以同样的方式载入。有加载使用同样方式的方法吗?这个再加选项在这种情况下不能使用,会抛出一个异常的OOM。
1个回答
  • 1970-01-01 08:00
    请使用如下模板: <pre class='brush:csharp'> <ControlTemplate x:Key="{dxrt:RibbonPageGroupThemeKey ResourceKey=ControlTemplate}" TargetType="{x:Type dxr:RibbonPageGroupControl}"> <Grid> <dxb:BarButtonItemLinkControl x:Name="PART_OriginButtonItemLinkControl" ContainerType="RibbonPageGroup" Content="Wg" Width="0" IsHitTestVisible="False" VerticalAlignment="Top" HorizontalAlignment="Left" /> <ContentControl x:Name="PART_Border" Template="{TemplateBinding ActualBorderTemplate}" Focusable="False" IsTabStop="False" DataContext="{Binding Path=PageGroup.Page.PageCategory.Color, RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="{Binding Path=IsCollapsed, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource invertBoolToVisibilityConverter}}"> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ItemsPresenter x:Name="PART_ItemsPresenter" Grid.Row="0" Style="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=ContentStyle}}" /> </Grid> </ContentControl> <Grid x:Name="PART_PopupButton" Visibility="{Binding Path=IsCollapsed, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}"> <dxb:ItemBorderControl x:Name="PART_PopupButtonBorder" Template="{TemplateBinding ActualPopupButtonBorderTemplate}" DataContext="{Binding Path=PageGroup.Page.PageCategory.Color, RelativeSource={RelativeSource Mode=TemplatedParent}}" HideBorderSide="None" /> <dx:Items2Panel Style="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=LayoutPanelStyle}}"> <dx:Items2Panel.Content1> <ContentControl Template="{TemplateBinding ActualPopupButtonGlyphBorderTemplate}" DataContext="{Binding Path=PageGroup.Page.PageCategory.Color, RelativeSource={RelativeSource Mode=TemplatedParent}}" VerticalAlignment="Top"> <dx:PixelSnapper VerticalAlignment="Center" HorizontalAlignment="Center"> <Image Grid.Row="0" SnapsToDevicePixels="True" Source="{Binding Path=PageGroup.Glyph, RelativeSource={RelativeSource TemplatedParent}}" /> </dx:PixelSnapper> </ContentControl> </dx:Items2Panel.Content1> <dx:Items2Panel.Content2> <dxb:TextSplitterControl Content="{Binding Path=PageGroup.Caption, RelativeSource={RelativeSource TemplatedParent}}" SplitMethod="BySpace" IsSelected="{TemplateBinding IsMouseOver}" Style="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=TextSplitterStyle}}" NormalArrowTemplate="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=NormalArrowTemplateInTextSplitter}}" SelectedArrowTemplate="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=SelectedArrowTemplateInTextSplitter}}" NormalTextStyle="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=NormalTextStyleInTextSplitter}}" SelectedTextStyle="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=SelectedTextStyleInTextSplitter}}" BottomSideArrowContainerStyle="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=BottomSideArrowContainerStyleInTextSplitter}}" RightSideArrowContainerStyle="{DynamicResource {dxrt:RibbonPageGroupThemeKey ResourceKey=RightSideArrowContainerStyleInTextSplitter}}" IsArrowVisible="True" /> </dx:Items2Panel.Content2> </dx:Items2Panel> </Grid> </Grid> </ControlTemplate> </pre>
    1
    回复 举报
回复

登录 慧都网发表评论

扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP