mdi
This commit is contained in:
parent
2004876770
commit
db457dac7b
@ -23,25 +23,23 @@ namespace CPF.Toolkit.Demo
|
|||||||
this.Width = 1280;
|
this.Width = 1280;
|
||||||
this.Height = 720;
|
this.Height = 720;
|
||||||
this.Background = null;
|
this.Background = null;
|
||||||
var frame = this.Children.Add(new WindowFrame(this, new Panel
|
var frame = this.Children.Add(new WindowFrame(this, new MdiHost
|
||||||
{
|
{
|
||||||
Size = SizeField.Fill,
|
|
||||||
Background = "204,204,204",
|
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new MdiWindow
|
new MdiWindow
|
||||||
{
|
{
|
||||||
Title = "test",
|
Title = "test",
|
||||||
//Content = new WrapPanel
|
Content = new WrapPanel
|
||||||
//{
|
{
|
||||||
// Children =
|
Children =
|
||||||
// {
|
{
|
||||||
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
new Button{ Content = "test" ,Width = 100, Height = 35 },
|
||||||
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
new Button{ Content = "test" ,Width = 100, Height = 35 },
|
||||||
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
new Button{ Content = "test" ,Width = 100, Height = 35 },
|
||||||
// new Button{ Content = "test" ,Width = 100, Height = 35 },
|
new Button{ Content = "test" ,Width = 100, Height = 35 },
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
@ -1,223 +0,0 @@
|
|||||||
using CPF.Controls;
|
|
||||||
using CPF.Drawing;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace CPF.Toolkit.Controls
|
|
||||||
{
|
|
||||||
internal class MdiFrame : Control
|
|
||||||
{
|
|
||||||
public MdiFrame()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.Children.Add(new Grid
|
|
||||||
{
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
RowDefinitions =
|
|
||||||
{
|
|
||||||
new RowDefinition{ Height = 35 },
|
|
||||||
new RowDefinition{ },
|
|
||||||
},
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new Thumb
|
|
||||||
{
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
Background = new LinearGradientFill
|
|
||||||
{
|
|
||||||
EndPoint = "0,100%",
|
|
||||||
GradientStops =
|
|
||||||
{
|
|
||||||
new GradientStop("152,180,208",0),
|
|
||||||
new GradientStop("181,206,231",1),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Child = new Panel
|
|
||||||
{
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new StackPanel
|
|
||||||
{
|
|
||||||
Orientation = Orientation.Horizontal,
|
|
||||||
MarginLeft = 0,
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new TextBlock
|
|
||||||
{
|
|
||||||
[nameof(TextBlock.Text)] = new BindingDescribe(this,nameof(this.Title),BindingMode.OneWay),
|
|
||||||
FontSize = 14,
|
|
||||||
MarginLeft = 10,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new StackPanel
|
|
||||||
{
|
|
||||||
Orientation = Orientation.Horizontal,
|
|
||||||
MarginRight = 0,
|
|
||||||
Height = "100%",
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new SystemButton
|
|
||||||
{
|
|
||||||
Name = "min",
|
|
||||||
Size = new SizeField(30,"100%"),
|
|
||||||
Content = new Line
|
|
||||||
{
|
|
||||||
MarginTop = 5,
|
|
||||||
MarginLeft = "auto",
|
|
||||||
StartPoint = new Point(1,13),
|
|
||||||
EndPoint = new Point(14,13),
|
|
||||||
StrokeStyle = "2",
|
|
||||||
IsAntiAlias = true,
|
|
||||||
StrokeFill = "black"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new Panel
|
|
||||||
{
|
|
||||||
Height = "100%",
|
|
||||||
Bindings =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
nameof(Visibility),
|
|
||||||
nameof(MaximizeBox),
|
|
||||||
this,
|
|
||||||
BindingMode.OneWay,
|
|
||||||
a => (bool)a ? Visibility.Visible : Visibility.Collapsed
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new SystemButton
|
|
||||||
{
|
|
||||||
Name = "max",
|
|
||||||
Size = new SizeField(30,"100%"),
|
|
||||||
Content = new Rectangle
|
|
||||||
{
|
|
||||||
Size = new SizeField(14,12),
|
|
||||||
MarginTop = 10,
|
|
||||||
StrokeStyle = "2",
|
|
||||||
},
|
|
||||||
Commands =
|
|
||||||
{
|
|
||||||
{ nameof(Button.Click),(s,e) => this.WindowState = WindowState.Maximized }
|
|
||||||
},
|
|
||||||
Bindings =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
nameof(Border.Visibility),
|
|
||||||
nameof(this.WindowState),
|
|
||||||
this,
|
|
||||||
BindingMode.OneWay,
|
|
||||||
a => (WindowState)a == WindowState.Maximized || (WindowState)a == WindowState.FullScreen ? Visibility.Collapsed : Visibility.Visible
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new SystemButton
|
|
||||||
{
|
|
||||||
Name = "nor",
|
|
||||||
Visibility = Visibility.Collapsed,
|
|
||||||
Size = new SizeField(30,"100%"),
|
|
||||||
Content = new Panel
|
|
||||||
{
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new Rectangle
|
|
||||||
{
|
|
||||||
MarginTop = 15,
|
|
||||||
MarginLeft =8,
|
|
||||||
Size = new SizeField(11,8),
|
|
||||||
StrokeStyle = "1.5",
|
|
||||||
},
|
|
||||||
new Polyline
|
|
||||||
{
|
|
||||||
MarginTop =11,
|
|
||||||
MarginLeft = 12,
|
|
||||||
Points =
|
|
||||||
{
|
|
||||||
new Point(0,3),
|
|
||||||
new Point(0,0),
|
|
||||||
new Point(9,0),
|
|
||||||
new Point(9,7),
|
|
||||||
new Point(6,7)
|
|
||||||
},
|
|
||||||
StrokeStyle = "2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Commands =
|
|
||||||
{
|
|
||||||
{ nameof(Button.Click),(s,e) => this.WindowState = WindowState.Normal }
|
|
||||||
},
|
|
||||||
Bindings =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
nameof(Border.Visibility),
|
|
||||||
nameof(Window.WindowState),
|
|
||||||
this,
|
|
||||||
BindingMode.OneWay,
|
|
||||||
a => (WindowState)a == WindowState.Normal ? Visibility.Collapsed : Visibility.Visible
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new SystemButton
|
|
||||||
{
|
|
||||||
Name = "close",
|
|
||||||
Size = new SizeField(30,"100%"),
|
|
||||||
Content = new Panel
|
|
||||||
{
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
new Line
|
|
||||||
{
|
|
||||||
MarginTop=10,
|
|
||||||
MarginLeft=8,
|
|
||||||
StartPoint = new Point(1, 1),
|
|
||||||
EndPoint = new Point(14, 13),
|
|
||||||
StrokeStyle = "2",
|
|
||||||
IsAntiAlias=true,
|
|
||||||
},
|
|
||||||
new Line
|
|
||||||
{
|
|
||||||
MarginTop=10,
|
|
||||||
MarginLeft=8,
|
|
||||||
StartPoint = new Point(14, 1),
|
|
||||||
EndPoint = new Point(1, 13),
|
|
||||||
StrokeStyle = "2",
|
|
||||||
IsAntiAlias=true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}.Assign(out var thumb),
|
|
||||||
new Panel
|
|
||||||
{
|
|
||||||
Attacheds = { { Grid.RowIndex,1 } },
|
|
||||||
BorderFill = "186,210,234",
|
|
||||||
BorderType = BorderType.BorderThickness,
|
|
||||||
BorderThickness = new Thickness(5,0,5,5),
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
44
CPF.Toolkit/Controls/MdiHost.cs
Normal file
44
CPF.Toolkit/Controls/MdiHost.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using CPF.Controls;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace CPF.Toolkit.Controls
|
||||||
|
{
|
||||||
|
public class MdiHost : Panel
|
||||||
|
{
|
||||||
|
public MdiHost()
|
||||||
|
{
|
||||||
|
Size = SizeField.Fill;
|
||||||
|
Background = "204,204,204";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue, PropertyMetadataAttribute propertyMetadata)
|
||||||
|
{
|
||||||
|
if (propertyName == nameof(ActualSize))
|
||||||
|
{
|
||||||
|
foreach (MdiWindow item in this.Children)
|
||||||
|
{
|
||||||
|
if (item.WindowState == WindowState.Maximized) continue;
|
||||||
|
|
||||||
|
if (item.MarginLeft.Value + item.ActualSize.Width > this.ActualSize.Width)
|
||||||
|
{
|
||||||
|
item.MarginLeft = this.ActualSize.Width - item.ActualSize.Width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.MarginTop.Value + item.ActualSize.Height > this.ActualSize.Height)
|
||||||
|
{
|
||||||
|
item.MarginTop = this.ActualSize.Height - item.ActualSize.Height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
base.OnPropertyChanged(propertyName, oldValue, newValue, propertyMetadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnUIElementAdded(UIElementAddedEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnUIElementAdded(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -32,34 +32,101 @@ namespace CPF.Toolkit.Controls
|
|||||||
Point normalPos = new Point(0, 0);
|
Point normalPos = new Point(0, 0);
|
||||||
protected override void InitializeComponent()
|
protected override void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
var bar = (ViewFill)"154,180,208";
|
||||||
this.Size = normalSize;
|
this.Size = normalSize;
|
||||||
this.Background = "white";
|
this.Background = "white";
|
||||||
this.BorderFill = "179,179,179";
|
|
||||||
this.BorderStroke = "1";
|
|
||||||
this.MarginLeft = 0;
|
this.MarginLeft = 0;
|
||||||
this.MarginTop = 0;
|
this.MarginTop = 0;
|
||||||
|
this.MinWidth = 150;
|
||||||
|
this.MinHeight = 50;
|
||||||
|
this.ClipToBounds = true;
|
||||||
base.Children.Add(new Grid
|
base.Children.Add(new Grid
|
||||||
{
|
{
|
||||||
Size = SizeField.Fill,
|
Size = SizeField.Fill,
|
||||||
|
ColumnDefinitions =
|
||||||
|
{
|
||||||
|
new ColumnDefinition{ Width = "auto" },
|
||||||
|
new ColumnDefinition{ },
|
||||||
|
new ColumnDefinition{ Width = "auto" },
|
||||||
|
},
|
||||||
RowDefinitions =
|
RowDefinitions =
|
||||||
{
|
{
|
||||||
new RowDefinition{ Height = 35 },
|
new RowDefinition{ Height = "auto" },
|
||||||
new RowDefinition{ },
|
new RowDefinition{ Height = 30 },
|
||||||
|
new RowDefinition{ },
|
||||||
|
new RowDefinition{ Height = "auto" },
|
||||||
},
|
},
|
||||||
Children =
|
Children =
|
||||||
{
|
{
|
||||||
new Thumb
|
new Thumb
|
||||||
{
|
{
|
||||||
Size = SizeField.Fill,
|
Name = "top",
|
||||||
Background = new LinearGradientFill
|
Size = "100%,5",
|
||||||
|
Background = bar,
|
||||||
|
Cursor = Cursors.SizeNorthSouth,
|
||||||
|
Attacheds = { { Grid.ColumnSpan,3 } },
|
||||||
|
Commands =
|
||||||
{
|
{
|
||||||
EndPoint = "0,100%",
|
|
||||||
GradientStops =
|
|
||||||
{
|
{
|
||||||
new GradientStop("152,180,208",0),
|
nameof(Thumb.DragDelta),(s,e) =>
|
||||||
new GradientStop("181,206,231",1),
|
{
|
||||||
|
var args = e as DragDeltaEventArgs;
|
||||||
|
if (this.Height.Value - args.VerticalChange > 0)
|
||||||
|
{
|
||||||
|
this.MarginTop += args.VerticalChange;
|
||||||
|
this.Height -= args.VerticalChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
new Thumb
|
||||||
|
{
|
||||||
|
Name = "left",
|
||||||
|
Size = "5,100%",
|
||||||
|
Background = bar,
|
||||||
|
Cursor = Cursors.SizeWestEast,
|
||||||
|
Attacheds = { { Grid.ColumnIndex,0 } ,{ Grid.RowSpan,4 } },
|
||||||
|
Commands =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
nameof(Thumb.DragDelta),(s,e) =>
|
||||||
|
{
|
||||||
|
var args = e as DragDeltaEventArgs;
|
||||||
|
if (this.Width.Value - args.HorizontalChange > 0)
|
||||||
|
{
|
||||||
|
this.MarginLeft += args.HorizontalChange;
|
||||||
|
this.Width -= args.HorizontalChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Thumb
|
||||||
|
{
|
||||||
|
Name = "right",
|
||||||
|
Size = "5,100%",
|
||||||
|
Background = bar,
|
||||||
|
Cursor = Cursors.SizeWestEast,
|
||||||
|
MarginRight = 0,
|
||||||
|
Attacheds = { { Grid.ColumnIndex,2 },{ Grid.RowSpan,4 } },
|
||||||
|
Commands = { { nameof(Thumb.DragDelta),(s,e) => this.Width += (e as DragDeltaEventArgs).HorizontalChange } }
|
||||||
|
},
|
||||||
|
new Thumb
|
||||||
|
{
|
||||||
|
Name = "bottom",
|
||||||
|
Size = "100%,5",
|
||||||
|
Background = bar,
|
||||||
|
Cursor = Cursors.SizeNorthSouth,
|
||||||
|
Attacheds = { { Grid.RowIndex,3 },{ Grid.ColumnSpan,3 } },
|
||||||
|
Commands = { { nameof(Thumb.DragDelta),(s,e) => this.Height += (e as DragDeltaEventArgs).VerticalChange } }
|
||||||
|
},
|
||||||
|
new Thumb
|
||||||
|
{
|
||||||
|
Name = "caption",
|
||||||
|
Attacheds = { { Grid.RowIndex,1 },{ Grid.ColumnIndex,1 } },
|
||||||
|
Size = SizeField.Fill,
|
||||||
|
Background = bar,
|
||||||
Child = new Panel
|
Child = new Panel
|
||||||
{
|
{
|
||||||
Size = SizeField.Fill,
|
Size = SizeField.Fill,
|
||||||
@ -92,7 +159,7 @@ namespace CPF.Toolkit.Controls
|
|||||||
Size = new SizeField(30,"100%"),
|
Size = new SizeField(30,"100%"),
|
||||||
Content = new Line
|
Content = new Line
|
||||||
{
|
{
|
||||||
MarginTop = 5,
|
//MarginTop = 5,
|
||||||
MarginLeft = "auto",
|
MarginLeft = "auto",
|
||||||
StartPoint = new Point(1,13),
|
StartPoint = new Point(1,13),
|
||||||
EndPoint = new Point(14,13),
|
EndPoint = new Point(14,13),
|
||||||
@ -123,7 +190,7 @@ namespace CPF.Toolkit.Controls
|
|||||||
Content = new Rectangle
|
Content = new Rectangle
|
||||||
{
|
{
|
||||||
Size = new SizeField(14,12),
|
Size = new SizeField(14,12),
|
||||||
MarginTop = 10,
|
MarginTop = 5,
|
||||||
StrokeStyle = "2",
|
StrokeStyle = "2",
|
||||||
},
|
},
|
||||||
Commands =
|
Commands =
|
||||||
@ -153,14 +220,14 @@ namespace CPF.Toolkit.Controls
|
|||||||
{
|
{
|
||||||
new Rectangle
|
new Rectangle
|
||||||
{
|
{
|
||||||
MarginTop = 15,
|
MarginTop = 10,
|
||||||
MarginLeft =8,
|
MarginLeft =8,
|
||||||
Size = new SizeField(11,8),
|
Size = new SizeField(11,8),
|
||||||
StrokeStyle = "1.5",
|
StrokeStyle = "1.5",
|
||||||
},
|
},
|
||||||
new Polyline
|
new Polyline
|
||||||
{
|
{
|
||||||
MarginTop =11,
|
MarginTop =5,
|
||||||
MarginLeft = 12,
|
MarginLeft = 12,
|
||||||
Points =
|
Points =
|
||||||
{
|
{
|
||||||
@ -202,7 +269,7 @@ namespace CPF.Toolkit.Controls
|
|||||||
{
|
{
|
||||||
new Line
|
new Line
|
||||||
{
|
{
|
||||||
MarginTop=10,
|
MarginTop=4,
|
||||||
MarginLeft=8,
|
MarginLeft=8,
|
||||||
StartPoint = new Point(1, 1),
|
StartPoint = new Point(1, 1),
|
||||||
EndPoint = new Point(14, 13),
|
EndPoint = new Point(14, 13),
|
||||||
@ -211,7 +278,7 @@ namespace CPF.Toolkit.Controls
|
|||||||
},
|
},
|
||||||
new Line
|
new Line
|
||||||
{
|
{
|
||||||
MarginTop=10,
|
MarginTop=4,
|
||||||
MarginLeft=8,
|
MarginLeft=8,
|
||||||
StartPoint = new Point(14, 1),
|
StartPoint = new Point(14, 1),
|
||||||
EndPoint = new Point(1, 13),
|
EndPoint = new Point(1, 13),
|
||||||
@ -225,33 +292,45 @@ namespace CPF.Toolkit.Controls
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}.Assign(out var thumb),
|
Commands =
|
||||||
new Panel
|
|
||||||
{
|
|
||||||
Attacheds = { { Grid.RowIndex,1 } },
|
|
||||||
BorderFill = "186,210,234",
|
|
||||||
BorderType = BorderType.BorderThickness,
|
|
||||||
BorderThickness = new Thickness(5,0,5,5),
|
|
||||||
Size = SizeField.Fill,
|
|
||||||
Children =
|
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
nameof(Thumb.DragDelta),
|
||||||
|
(s,e) =>
|
||||||
|
{
|
||||||
|
if (this.WindowState == WindowState.Maximized) return;
|
||||||
|
var arge = e as DragDeltaEventArgs;
|
||||||
|
this.MarginLeft += arge.HorizontalChange;
|
||||||
|
this.MarginTop += arge.VerticalChange;
|
||||||
|
this.normalPos = new Point(this.MarginLeft.Value, this.MarginTop.Value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
nameof(DoubleClick),
|
||||||
|
(s,e) => this.Delay(TimeSpan.FromMilliseconds(150),() =>
|
||||||
|
{
|
||||||
|
if (this.WindowState.Or(WindowState.Maximized,WindowState.Minimized))
|
||||||
|
{
|
||||||
|
this.WindowState = WindowState.Normal;
|
||||||
|
}
|
||||||
|
else if (this.WindowState == WindowState.Normal)
|
||||||
|
{
|
||||||
|
this.WindowState = WindowState.Maximized;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
new Decorator
|
||||||
|
{
|
||||||
|
Attacheds = { { Grid.RowIndex,2 } ,{ Grid.ColumnIndex,1 } },
|
||||||
|
Size = SizeField.Fill,
|
||||||
|
Child = this.Content,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
thumb.DragDelta += Thumb_DragDelta;
|
this.Content.Margin = "0";
|
||||||
}
|
this.Content.ClipToBounds = true;
|
||||||
|
|
||||||
private void Thumb_DragDelta(object sender, DragDeltaEventArgs e)
|
|
||||||
{
|
|
||||||
if (this.WindowState == WindowState.Maximized)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.MarginLeft += e.HorizontalChange;
|
|
||||||
this.MarginTop += e.VerticalChange;
|
|
||||||
this.normalPos = new Point(this.MarginLeft.Value, this.MarginTop.Value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue, PropertyMetadataAttribute propertyMetadata)
|
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue, PropertyMetadataAttribute propertyMetadata)
|
||||||
@ -283,6 +362,7 @@ namespace CPF.Toolkit.Controls
|
|||||||
case nameof(Size):
|
case nameof(Size):
|
||||||
case nameof(Width):
|
case nameof(Width):
|
||||||
case nameof(Height):
|
case nameof(Height):
|
||||||
|
case nameof(ActualSize):
|
||||||
if (this.WindowState == WindowState.Normal)
|
if (this.WindowState == WindowState.Normal)
|
||||||
{
|
{
|
||||||
this.normalSize = this.Size;
|
this.normalSize = this.Size;
|
||||||
@ -295,11 +375,6 @@ namespace CPF.Toolkit.Controls
|
|||||||
{
|
{
|
||||||
this.MarginLeft = 0;
|
this.MarginLeft = 0;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var value = this.MarginLeft.Value + this.Width.Value;
|
|
||||||
Debug.WriteLine(value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case nameof(MarginTop):
|
case nameof(MarginTop):
|
||||||
@ -308,15 +383,6 @@ namespace CPF.Toolkit.Controls
|
|||||||
this.MarginTop = 0;
|
this.MarginTop = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//case nameof(MarginRight):
|
|
||||||
// if (MarginRight.Value <= 0)
|
|
||||||
// {
|
|
||||||
// this.MarginRight = 0;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
//case nameof(MarginBottom):
|
|
||||||
|
|
||||||
// break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnPropertyChanged(propertyName, oldValue, newValue, propertyMetadata);
|
base.OnPropertyChanged(propertyName, oldValue, newValue, propertyMetadata);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user