Merge branch 'master' into ColorPicker-event
This commit is contained in:
commit
ede66ad89c
58 files changed
+726
-318
No files matched your search
@@ -21,6 +21,8 @@ namespace HandyControl.Controls
|
||||
{
|
||||
private static readonly Guid GifGuid = new Guid("{b96b3caa-0728-11d3-9d7b-0000f81ef32e}");
|
||||
|
||||
private static readonly Guid GifSingleFrameGuid = new Guid("{b96b3cb0-0728-11d3-9d7b-0000f81ef32e}");
|
||||
|
||||
internal IntPtr NativeImage;
|
||||
|
||||
private byte[] _rawData;
|
||||
@@ -204,8 +206,12 @@ namespace HandyControl.Controls
|
||||
streamInfo = Application.GetContentStream(uri) ?? Application.GetResourceStream(uri);
|
||||
}
|
||||
}
|
||||
|
||||
if (streamInfo == null)
|
||||
{
|
||||
throw new FileNotFoundException("Resource not found.", uri.ToString());
|
||||
}
|
||||
|
||||
CreateSourceFromStream(streamInfo.Stream);
|
||||
}
|
||||
catch
|
||||
@@ -214,20 +220,36 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}
|
||||
|
||||
private void SwitchToCommonImage()
|
||||
{
|
||||
if (Source == null && Uri != null)
|
||||
{
|
||||
SetCurrentValue(SourceProperty, new BitmapImage(Uri));
|
||||
}
|
||||
}
|
||||
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
[ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)]
|
||||
internal static void EnsureSave(GifImage image, string filename, Stream dataStream)
|
||||
{
|
||||
if (!image.RawGuid.Equals(GifGuid)) return;
|
||||
var animatedGif = false;
|
||||
if (!image.RawGuid.Equals(GifGuid) && !image.RawGuid.Equals(GifSingleFrameGuid))
|
||||
{
|
||||
image.SwitchToCommonImage();
|
||||
return;
|
||||
}
|
||||
|
||||
var animatedGif = false;
|
||||
var dimensions = image.FrameDimensionsList;
|
||||
if (dimensions.Select(guid => new GifFrameDimension(guid)).Contains(GifFrameDimension.Time))
|
||||
{
|
||||
animatedGif = image.GetFrameCount(GifFrameDimension.Time) > 1;
|
||||
}
|
||||
|
||||
if (!animatedGif) return;
|
||||
if (!animatedGif)
|
||||
{
|
||||
image.SwitchToCommonImage();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -239,7 +239,6 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
_panel.Children.Clear();
|
||||
var dataContext = DataContext;
|
||||
|
||||
foreach (var item in SelectedItems)
|
||||
{
|
||||
@@ -251,7 +250,7 @@ namespace HandyControl.Controls
|
||||
Tag = checkComboBoxItem
|
||||
};
|
||||
|
||||
if (dataContext != null)
|
||||
if (ItemsSource != null)
|
||||
{
|
||||
tag.SetBinding(ContentControl.ContentProperty, new Binding(DisplayMemberPath) { Source = item });
|
||||
}
|
||||
|
||||
@@ -180,6 +180,10 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
Storyboard.Begin();
|
||||
if (!IsRunning)
|
||||
{
|
||||
Storyboard.Pause();
|
||||
}
|
||||
}
|
||||
|
||||
private Border CreateBorder(int index, double dotInterval, bool needHidden)
|
||||
|
||||
@@ -98,6 +98,10 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
Storyboard.Begin();
|
||||
if (!IsRunning)
|
||||
{
|
||||
Storyboard.Pause();
|
||||
}
|
||||
}
|
||||
|
||||
private Ellipse CreateEllipse(int index, double dotInterval, double dotDiameter)
|
||||
|
||||
@@ -578,37 +578,34 @@ namespace HandyControl.Controls
|
||||
|
||||
private IntPtr Callback(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
|
||||
{
|
||||
if (IsLoaded)
|
||||
if (msg == _wmTaskbarCreated)
|
||||
{
|
||||
if (msg == _wmTaskbarCreated)
|
||||
if (_messageWindowHandle == hWnd && Visibility == Visibility.Visible)
|
||||
{
|
||||
if (_messageWindowHandle == hWnd && Visibility == Visibility.Visible)
|
||||
{
|
||||
UpdateIcon(true);
|
||||
}
|
||||
UpdateIcon(true);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (lparam.ToInt64())
|
||||
{
|
||||
switch (lparam.ToInt64())
|
||||
{
|
||||
case InteropValues.WM_LBUTTONDBLCLK:
|
||||
WmMouseDown(MouseButton.Left, 2);
|
||||
break;
|
||||
case InteropValues.WM_LBUTTONUP:
|
||||
WmMouseUp(MouseButton.Left);
|
||||
break;
|
||||
case InteropValues.WM_RBUTTONUP:
|
||||
ShowContextMenu();
|
||||
WmMouseUp(MouseButton.Right);
|
||||
break;
|
||||
case InteropValues.WM_MOUSEMOVE:
|
||||
if (!_dispatcherTimerPos.IsEnabled)
|
||||
{
|
||||
_dispatcherTimerPos.Interval = TimeSpan.FromMilliseconds(200);
|
||||
_dispatcherTimerPos.Start();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case InteropValues.WM_LBUTTONDBLCLK:
|
||||
WmMouseDown(MouseButton.Left, 2);
|
||||
break;
|
||||
case InteropValues.WM_LBUTTONUP:
|
||||
WmMouseUp(MouseButton.Left);
|
||||
break;
|
||||
case InteropValues.WM_RBUTTONUP:
|
||||
ShowContextMenu();
|
||||
WmMouseUp(MouseButton.Right);
|
||||
break;
|
||||
case InteropValues.WM_MOUSEMOVE:
|
||||
if (!_dispatcherTimerPos.IsEnabled)
|
||||
{
|
||||
_dispatcherTimerPos.Interval = TimeSpan.FromMilliseconds(200);
|
||||
_dispatcherTimerPos.Start();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
if (d is Pagination pagination)
|
||||
{
|
||||
pagination.OnAutoHidingChanged((bool)e.NewValue);
|
||||
pagination.OnAutoHidingChanged((bool) e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,12 @@ namespace HandyControl.Controls
|
||||
#region Calc AvailableSize
|
||||
|
||||
_childGraph.Reset(false);
|
||||
var boundingSize = _childGraph.GetBoundingSize(Width.IsNaN(), Height.IsNaN());
|
||||
|
||||
|
||||
var calcWidth = Width.IsNaN() && HorizontalAlignment != HorizontalAlignment.Stretch;
|
||||
var calcHeight = Height.IsNaN() && VerticalAlignment != VerticalAlignment.Stretch;
|
||||
|
||||
var boundingSize = _childGraph.GetBoundingSize(calcWidth, calcHeight);
|
||||
_childGraph.Reset();
|
||||
_childGraph.Measure(boundingSize);
|
||||
return boundingSize;
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace HandyControl.Controls
|
||||
_dataView.GroupDescriptions.Clear();
|
||||
_dataView.SortDescriptions.Clear();
|
||||
_dataView.SortDescriptions.Add(new SortDescription(PropertyItem.CategoryProperty.Name, ListSortDirection.Ascending));
|
||||
_dataView.SortDescriptions.Add(new SortDescription(PropertyItem.PropertyNameProperty.Name, ListSortDirection.Ascending));
|
||||
_dataView.SortDescriptions.Add(new SortDescription(PropertyItem.DisplayNameProperty.Name, ListSortDirection.Ascending));
|
||||
_dataView.GroupDescriptions.Add(new PropertyGroupDescription(PropertyItem.CategoryProperty.Name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,14 @@ namespace HandyControl.Controls
|
||||
}
|
||||
_isItemSelected = false;
|
||||
}
|
||||
|
||||
if (!item.HasItems)
|
||||
{
|
||||
RaiseEvent(new FunctionEventArgs<object>(SelectionChangedEvent, this)
|
||||
{
|
||||
Info = e.OriginalSource
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,12 +89,18 @@ namespace HandyControl.Controls
|
||||
base.OnMouseMove(e);
|
||||
|
||||
if (_previewContent == null) return;
|
||||
|
||||
var p = e.GetPosition(_adorner);
|
||||
var maximum = Maximum;
|
||||
var minimum = Minimum;
|
||||
|
||||
if (Orientation == Orientation.Horizontal)
|
||||
{
|
||||
var pos = (e.GetPosition(this).X - _thumb.ActualWidth / 2) / _track.ActualWidth * Maximum;
|
||||
if (pos > Maximum || pos < 0)
|
||||
|
||||
var pos = !IsDirectionReversed
|
||||
? (e.GetPosition(this).X - _thumb.ActualWidth * 0.5) / _track.ActualWidth * (maximum - minimum) + minimum
|
||||
: (1 - (e.GetPosition(this).X - _thumb.ActualWidth * 0.5) / _track.ActualWidth) * (maximum - minimum) + minimum;
|
||||
if (pos > maximum || pos < 0)
|
||||
{
|
||||
if (_thumb.IsMouseCaptureWithin)
|
||||
{
|
||||
@@ -103,15 +109,17 @@ namespace HandyControl.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
_transform.X = p.X - _previewContent.ActualWidth / 2;
|
||||
_transform.X = p.X - _previewContent.ActualWidth * 0.5;
|
||||
_transform.Y = TranslatePoint(new Point(), _adorner).Y - _previewContent.ActualHeight - PreviewContentOffset;
|
||||
|
||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
var pos = Maximum - (e.GetPosition(this).Y - _thumb.ActualHeight / 2) / _track.ActualHeight * Maximum;
|
||||
if (pos > Maximum || pos < 0)
|
||||
var pos = !IsDirectionReversed
|
||||
? (1 - (e.GetPosition(this).Y - _thumb.ActualHeight * 0.5) / _track.ActualHeight) * (maximum - minimum) + minimum
|
||||
: (e.GetPosition(this).Y - _thumb.ActualHeight * 0.5) / _track.ActualHeight * (maximum - minimum) + minimum;
|
||||
if (pos > maximum || pos < 0)
|
||||
{
|
||||
if (_thumb.IsMouseCaptureWithin)
|
||||
{
|
||||
@@ -121,7 +129,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
_transform.X = TranslatePoint(new Point(), _adorner).X - _previewContent.ActualWidth - PreviewContentOffset;
|
||||
_transform.Y = p.Y - _previewContent.ActualHeight / 2;
|
||||
_transform.Y = p.Y - _previewContent.ActualHeight * 0.5;
|
||||
|
||||
PreviewPosition = _thumb.IsMouseCaptureWithin ? Value : pos;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private bool _showNo;
|
||||
|
||||
private IntPtr _lastActiveWindowIntPtr;
|
||||
|
||||
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(
|
||||
"Message", typeof(string), typeof(MessageBox), new PropertyMetadata(default(string)));
|
||||
|
||||
@@ -127,6 +129,16 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
base.OnSourceInitialized(e);
|
||||
|
||||
_lastActiveWindowIntPtr = InteropMethods.GetForegroundWindow();
|
||||
Activate();
|
||||
}
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
InteropMethods.SetForegroundWindow(_lastActiveWindowIntPtr);
|
||||
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
|
||||
@@ -943,6 +943,7 @@
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.AnimationPath.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Expression.Shapes.Arc.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.AxleCanvas.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Badge.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.BlendEffectBox.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.ButtonGroup.icon.bmp" />
|
||||
@@ -965,6 +966,7 @@
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Dialog.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Divider.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Drawer.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Empty.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.FlexPanel.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.FlipClock.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.GifImage.icon.bmp" />
|
||||
@@ -996,15 +998,18 @@
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Shield.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.SideMenu.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.SimplePanel.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.SimpleStackPanel.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.SimpleText.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.SplitButton.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.StepBar.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Tag.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.TagContainer.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.TimeBar.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.TimePicker.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.ToggleBlock.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Transfer.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.TransitioningContentControl.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.UniformSpacingPanel.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.WaterfallPanel.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.Watermark.icon.bmp" />
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Icons\HandyControl.Controls.WatermarkTextBox.icon.bmp" />
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 824 B |
Binary file not shown.
|
After Width: | Height: | Size: 824 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 822 B |
@@ -192,9 +192,9 @@
|
||||
<ColumnDefinition Width="28"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="PART_ButtonDropper" Width="16" Height="16" Margin="0,0,10,0" Style="{StaticResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True">
|
||||
<Path Data="{StaticResource DropperGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Path Stretch="Uniform" Data="{StaticResource DropperGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Path Data="{StaticResource DropperGeometry}" Fill="{DynamicResource DarkPrimaryBrush}"/>
|
||||
<Path Stretch="Uniform" Data="{StaticResource DropperGeometry}" Fill="{DynamicResource DarkPrimaryBrush}"/>
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<Border Grid.Row="0" Grid.Column="1" Width="32" Height="32" CornerRadius="16" Background="{StaticResource ColorPickerOpacityBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"/>
|
||||
@@ -244,4 +244,4 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
@@ -12,7 +12,7 @@
|
||||
<ControlTemplate x:Key="ExpanderLeftTemplate" TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="BorderHeader" Grid.Column="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
@@ -41,7 +41,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource DownGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -49,7 +49,7 @@
|
||||
<ControlTemplate x:Key="ExpanderUpTemplate" TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="BorderHeader" Grid.Row="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
@@ -73,7 +73,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource DownGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -82,7 +82,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="BorderHeader" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<ToggleButton VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Focusable="False" Padding="0,0,0,10" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="{TemplateBinding MinWidth}" Style="{StaticResource ToggleButtonCustom}">
|
||||
@@ -110,7 +110,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource UpGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -119,7 +119,7 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="BorderHeader" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<ToggleButton HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Focusable="False" Padding="10,0,0,0" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Width="{TemplateBinding Width}" Height="{TemplateBinding MinHeight}" Style="{StaticResource ToggleButtonCustom}">
|
||||
@@ -142,7 +142,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource UpGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -52,10 +52,13 @@
|
||||
<Border x:Name="TemplateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<hc:SimplePanel>
|
||||
<Rectangle x:Name="PART_Track"/>
|
||||
<TextBlock Visibility="{Binding Visibility,ElementName=PART_GlowRect}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Style="{StaticResource BorderClip}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||
<hc:SimplePanel>
|
||||
<Border x:Name="Indicator" Background="{TemplateBinding Foreground}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<Border Width="{Binding ActualWidth,ElementName=TemplateRoot}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100"/>
|
||||
<Rectangle x:Name="Animation" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<TextBlock Text="{TemplateBinding Subject}" VerticalAlignment="Center" Margin="4,0"/>
|
||||
</Border>
|
||||
<Border Grid.Column="1" Background="{TemplateBinding Color}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter},ConverterParameter='0,1,1,0'}">
|
||||
<ContentPresenter ContentSource="Status" VerticalAlignment="Center" Margin="4,0" TextElement.Foreground="{TemplateBinding Foreground}"/>
|
||||
<ContentPresenter ContentSource="Status" VerticalAlignment="Center" Margin="4,0" TextElement.Foreground="{TemplateBinding Foreground}" ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -46,12 +46,14 @@
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
|
||||
<Setter Property="Margin" Value="0,0,4,0"/>
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridCell">
|
||||
<Border CornerRadius="4" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
<Border Background="Transparent">
|
||||
<Border Margin="0,0,4,0" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:langs="clr-namespace:HandyControl.Properties.Langs" xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:converter="clr-namespace:HandyControl.Tools.Converter" xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:themes="clr-namespace:HandyControl.Themes" xmlns:interactivity="clr-namespace:HandyControl.Interactivity" xmlns:hc="clr-namespace:HandyControl.Controls" xmlns:tools="clr-namespace:HandyControl.Tools" xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes" xmlns:ex="clr-namespace:HandyControl.Tools.Extension">
|
||||
<!--
|
||||
This code was generated by a tool.
|
||||
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
-->
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:langs="clr-namespace:HandyControl.Properties.Langs" xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:converter="clr-namespace:HandyControl.Tools.Converter" xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:themes="clr-namespace:HandyControl.Themes" xmlns:interactivity="clr-namespace:HandyControl.Interactivity" xmlns:hc="clr-namespace:HandyControl.Controls" xmlns:tools="clr-namespace:HandyControl.Tools" xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes" xmlns:ex="clr-namespace:HandyControl.Tools.Extension">
|
||||
<langs:LangProvider x:Key="Langs" />
|
||||
<converter:Boolean2BooleanReConverter x:Key="Boolean2BooleanReConverter" />
|
||||
<converter:Boolean2VisibilityReConverter x:Key="Boolean2VisibilityReConverter" />
|
||||
@@ -2397,10 +2403,13 @@
|
||||
<Border x:Name="TemplateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<hc:SimplePanel>
|
||||
<Rectangle x:Name="PART_Track" />
|
||||
<TextBlock Visibility="{Binding Visibility,ElementName=PART_GlowRect}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Border Style="{StaticResource BorderClip}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||
<hc:SimplePanel>
|
||||
<Border x:Name="Indicator" Background="{TemplateBinding Foreground}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Border Width="{Binding ActualWidth,ElementName=TemplateRoot}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</Border>
|
||||
</Border>
|
||||
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100" />
|
||||
<Rectangle x:Name="Animation" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||
@@ -7480,9 +7489,9 @@
|
||||
<ColumnDefinition Width="28" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="PART_ButtonDropper" Width="16" Height="16" Margin="0,0,10,0" Style="{StaticResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True">
|
||||
<Path Data="{StaticResource DropperGeometry}" Fill="{DynamicResource PrimaryTextBrush}" />
|
||||
<Path Stretch="Uniform" Data="{StaticResource DropperGeometry}" Fill="{DynamicResource PrimaryTextBrush}" />
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Path Data="{StaticResource DropperGeometry}" Fill="{DynamicResource DarkPrimaryBrush}" />
|
||||
<Path Stretch="Uniform" Data="{StaticResource DropperGeometry}" Fill="{DynamicResource DarkPrimaryBrush}" />
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<Border Grid.Row="0" Grid.Column="1" Width="32" Height="32" CornerRadius="16" Background="{StaticResource ColorPickerOpacityBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" />
|
||||
@@ -8370,7 +8379,7 @@
|
||||
<ControlTemplate x:Key="ExpanderLeftTemplate" TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="BorderHeader" Grid.Column="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
@@ -8399,14 +8408,14 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource DownGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ExpanderUpTemplate" TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="BorderHeader" Grid.Row="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
@@ -8430,7 +8439,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource DownGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -8438,7 +8447,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="BorderHeader" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<ToggleButton VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Focusable="False" Padding="0,0,0,10" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="{TemplateBinding MinWidth}" Style="{StaticResource ToggleButtonCustom}">
|
||||
@@ -8466,7 +8475,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource UpGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -8474,7 +8483,7 @@
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="BorderHeader" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<ToggleButton HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Focusable="False" Padding="10,0,0,0" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Width="{TemplateBinding Width}" Height="{TemplateBinding MinHeight}" Style="{StaticResource ToggleButtonCustom}">
|
||||
@@ -8497,7 +8506,7 @@
|
||||
<Setter Property="Data" TargetName="PathArrow" Value="{StaticResource UpGeometry}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="2" />
|
||||
<Setter Property="Opacity" Value=".4" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -9927,7 +9936,7 @@
|
||||
<TextBlock Text="{TemplateBinding Subject}" VerticalAlignment="Center" Margin="4,0" />
|
||||
</Border>
|
||||
<Border Grid.Column="1" Background="{TemplateBinding Color}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource CornerRadiusSplitConverter},ConverterParameter='0,1,1,0'}">
|
||||
<ContentPresenter ContentSource="Status" VerticalAlignment="Center" Margin="4,0" TextElement.Foreground="{TemplateBinding Foreground}" />
|
||||
<ContentPresenter ContentSource="Status" VerticalAlignment="Center" Margin="4,0" TextElement.Foreground="{TemplateBinding Foreground}" ContentStringFormat="{TemplateBinding ContentStringFormat}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
@@ -11578,12 +11587,14 @@
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}" />
|
||||
<Setter Property="Margin" Value="0,0,4,0" />
|
||||
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="DataGridCell">
|
||||
<Border CornerRadius="4" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<Border Background="Transparent">
|
||||
<Border Margin="0,0,4,0" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</Border>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user