Performance / UI fixes
This commit is contained in:
Родитель
f8f6691963
Коммит
fae1df0351
|
@ -16,14 +16,9 @@
|
|||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace ICSharpCode.WpfDesign.Designer.Controls
|
||||
{
|
||||
|
|
|
@ -660,25 +660,24 @@
|
|||
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center"
|
||||
Margin="0,0,18,0"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Viewbox Stretch="Uniform" HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="0,3,3,3">
|
||||
<Button x:Name="TextRemover"
|
||||
<Button x:Name="TextRemover"
|
||||
Width="14"
|
||||
Height="14"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="0,0,3,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Stretch"
|
||||
IsTabStop="False"
|
||||
RenderTransformOrigin="0.5,0.5"
|
||||
Style="{StaticResource ClearButtonStyle}">
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
<SkewTransform />
|
||||
<RotateTransform />
|
||||
<TranslateTransform />
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
</Viewbox>
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||
<SkewTransform />
|
||||
<RotateTransform />
|
||||
<TranslateTransform />
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
Background="{x:Null}"
|
||||
Focusable="False"
|
||||
IsNullable="False"
|
||||
VirtualizingStackPanel.ScrollUnit="Pixel"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
>
|
||||
<local:NullableComboBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
|
|
@ -17,19 +17,7 @@
|
|||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using ICSharpCode.WpfDesign.PropertyGrid;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using ICSharpCode.WpfDesign.Designer.themes;
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<TextBox
|
||||
<controls:ClearableTextBox
|
||||
x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.TextBoxEditor"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:ICSharpCode.WpfDesign.Designer.Controls"
|
||||
Text="{Binding ValueString}"
|
||||
BorderThickness="0"
|
||||
Background="{x:Null}"
|
||||
>
|
||||
</TextBox>
|
||||
</controls:ClearableTextBox>
|
||||
|
|
|
@ -19,16 +19,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using ICSharpCode.WpfDesign.PropertyGrid;
|
||||
|
||||
|
|
|
@ -116,7 +116,20 @@
|
|||
<DockPanel.Resources>
|
||||
<DataTemplate DataType="{x:Type PropertyGridBase:Category}">
|
||||
<Expander Header="{Binding Name}" Style="{StaticResource CategoryExpanderStyle}" IsExpanded="{Binding IsExpanded}" Visibility="{Binding IsVisible, Converter={x:Static Converters:CollapsedWhenFalse.Instance}}">
|
||||
<ItemsControl ItemsSource="{Binding Properties}" />
|
||||
<ItemsControl VirtualizingStackPanel.ScrollUnit="Pixel" VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True" ItemsSource="{Binding Properties}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Template>
|
||||
<ControlTemplate>
|
||||
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ItemsControl.Template>
|
||||
</ItemsControl>
|
||||
</Expander>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type PropertyGridBase:PropertyNode}">
|
||||
|
@ -134,9 +147,37 @@
|
|||
</DockPanel>
|
||||
</Border>
|
||||
<StackPanel Visibility="{Binding IsExpanded, Converter={x:Static Converters:CollapsedWhenFalse.Instance}}">
|
||||
<ItemsControl ItemsSource="{Binding Children}" Visibility="{Binding Children.Count, Converter={x:Static Converters:CollapsedWhenZero.Instance}}" />
|
||||
<ItemsControl Background="#F9F9F4" Visibility="{Binding Children.Count, Converter={x:Static Converters:CollapsedWhenZero.Instance}}" VirtualizingStackPanel.ScrollUnit="Pixel" VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True" ItemsSource="{Binding Children}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Template>
|
||||
<ControlTemplate>
|
||||
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ItemsControl.Template>
|
||||
</ItemsControl>
|
||||
<Expander Visibility="{Binding MoreChildren.Count, Converter={x:Static Converters:CollapsedWhenZero.Instance}}" Style="{StaticResource MoreExpanderStyle}">
|
||||
<ItemsControl ItemsSource="{Binding MoreChildren}" Background="#F9F9F4" />
|
||||
<ItemsControl Background="#F9F9F4" VirtualizingStackPanel.ScrollUnit="Pixel" VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True" ItemsSource="{Binding MoreChildren}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Template>
|
||||
<ControlTemplate>
|
||||
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer Padding="{TemplateBinding Control.Padding}" Focusable="False">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ItemsControl.Template>
|
||||
</ItemsControl>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
@ -211,12 +252,44 @@
|
|||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid x:Name="c1" Background="White">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" Visibility="{Binding CurrentTab, Converter={x:Static Converters:EnumVisibility.Instance}, ConverterParameter=Properties}">
|
||||
<!--<ScrollViewer HorizontalScrollBarVisibility="Disabled" Visibility="{Binding CurrentTab, Converter={x:Static Converters:EnumVisibility.Instance}, ConverterParameter=Properties}">
|
||||
<ItemsControl ItemsSource="{Binding Categories}" />
|
||||
</ScrollViewer>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" Visibility="{Binding CurrentTab, Converter={x:Static Converters:EnumVisibility.Instance}, ConverterParameter=Events}">
|
||||
</ScrollViewer>-->
|
||||
<!--<ScrollViewer HorizontalScrollBarVisibility="Disabled" Visibility="{Binding CurrentTab, Converter={x:Static Converters:EnumVisibility.Instance}, ConverterParameter=Events}">
|
||||
<ItemsControl ItemsSource="{Binding Events}" />
|
||||
</ScrollViewer>
|
||||
</ScrollViewer>-->
|
||||
<ItemsControl VirtualizingStackPanel.ScrollUnit="Pixel" Visibility="{Binding CurrentTab, Converter={x:Static Converters:EnumVisibility.Instance}, ConverterParameter=Properties}" VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True" ItemsSource="{Binding Categories}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Template>
|
||||
<ControlTemplate>
|
||||
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer Padding="{TemplateBinding Control.Padding}" Focusable="False">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ItemsControl.Template>
|
||||
</ItemsControl>
|
||||
<ItemsControl VirtualizingStackPanel.ScrollUnit="Pixel" Visibility="{Binding CurrentTab, Converter={x:Static Converters:EnumVisibility.Instance}, ConverterParameter=Events}" VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True" ItemsSource="{Binding Events}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Template>
|
||||
<ControlTemplate>
|
||||
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer Padding="{TemplateBinding Control.Padding}" Focusable="False">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ItemsControl.Template>
|
||||
</ItemsControl>
|
||||
<Thumb x:Name="PART_Thumb" HorizontalAlignment="Left" Width="4" Margin="-2 0 0 0" Cursor="SizeWE">
|
||||
<Thumb.RenderTransform>
|
||||
<TranslateTransform X="{Binding FirstColumnWidth, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
|
||||
|
|
|
@ -16,13 +16,7 @@
|
|||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using ICSharpCode.WpfDesign.PropertyGrid;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace ICSharpCode.WpfDesign.PropertyGrid
|
||||
{
|
||||
|
|
|
@ -17,12 +17,9 @@
|
|||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
|
Загрузка…
Ссылка в новой задаче