1
This commit is contained in:
parent
9ab836ff44
commit
49b1ebcd5c
@ -31,14 +31,47 @@ namespace CPF.Toolkit.Controls
|
|||||||
ItemsPanel = new StackPanel { Orientation = Orientation.Horizontal },
|
ItemsPanel = new StackPanel { Orientation = Orientation.Horizontal },
|
||||||
ItemTemplate = new ListBoxItem
|
ItemTemplate = new ListBoxItem
|
||||||
{
|
{
|
||||||
Height = "100%",
|
|
||||||
Width = 100,
|
Width = 100,
|
||||||
MarginRight = 1,
|
MarginRight = 1,
|
||||||
FontSize = 16f,
|
FontSize = 16f,
|
||||||
BorderFill = "Silver",
|
BorderFill = "Silver",
|
||||||
BorderThickness = new Thickness(0, 0, 1, 0),
|
BorderThickness = new Thickness(1),
|
||||||
|
Margin = new ThicknessField(1),
|
||||||
|
CornerRadius = new CornerRadius(2),
|
||||||
|
IsAntiAlias = true,
|
||||||
|
UseLayoutRounding = true,
|
||||||
BorderType = BorderType.BorderThickness,
|
BorderType = BorderType.BorderThickness,
|
||||||
[nameof(ListBoxItem.Content)] = new BindingDescribe("Title")
|
ContentTemplate = new ContentTemplate
|
||||||
|
{
|
||||||
|
Size = SizeField.Fill,
|
||||||
|
Content = "test"
|
||||||
|
//Content = new StackPanel
|
||||||
|
//{
|
||||||
|
// Orientation = Orientation.Horizontal,
|
||||||
|
// Size = SizeField.Fill,
|
||||||
|
// Children =
|
||||||
|
// {
|
||||||
|
// new TextBlock
|
||||||
|
// {
|
||||||
|
// //[nameof(TextBlock.Text)] = new BindingDescribe("Title",BindingMode.OneWay)
|
||||||
|
// Text = "test"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//},
|
||||||
|
},
|
||||||
|
//Content = new StackPanel
|
||||||
|
//{
|
||||||
|
// Size = SizeField.Fill,
|
||||||
|
// Orientation = Orientation.Horizontal,
|
||||||
|
// Children =
|
||||||
|
// {
|
||||||
|
// new TextBlock
|
||||||
|
// {
|
||||||
|
// [nameof(TextBlock.Text)] = new BindingDescribe("Title",BindingMode.OneWay)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//},
|
||||||
|
//[nameof(ListBoxItem.Content)] = new BindingDescribe("Title")
|
||||||
},
|
},
|
||||||
Items = this.TaskBarList,
|
Items = this.TaskBarList,
|
||||||
[nameof(ListBox.SelectedValue)] = new BindingDescribe(this, nameof(this.SelectWindow), BindingMode.TwoWay),
|
[nameof(ListBox.SelectedValue)] = new BindingDescribe(this, nameof(this.SelectWindow), BindingMode.TwoWay),
|
||||||
@ -73,13 +106,13 @@ namespace CPF.Toolkit.Controls
|
|||||||
case TaskBarPlacement.Top:
|
case TaskBarPlacement.Top:
|
||||||
this.RowDefinitions.Add(new RowDefinition { Height = 35 });
|
this.RowDefinitions.Add(new RowDefinition { Height = 35 });
|
||||||
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||||
RowIndex(this.taskBar,0);
|
RowIndex(this.taskBar, 0);
|
||||||
RowIndex(this.host, 1);
|
RowIndex(this.host, 1);
|
||||||
break;
|
break;
|
||||||
case TaskBarPlacement.Bottom:
|
case TaskBarPlacement.Bottom:
|
||||||
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||||
this.RowDefinitions.Add(new RowDefinition { Height = 35 });
|
this.RowDefinitions.Add(new RowDefinition { Height = 35 });
|
||||||
RowIndex(this.host,0);
|
RowIndex(this.host, 0);
|
||||||
RowIndex(this.taskBar, 1);
|
RowIndex(this.taskBar, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,8 @@ namespace CPF.Toolkit.Controls
|
|||||||
Size = SizeField.Fill,
|
Size = SizeField.Fill,
|
||||||
Background = "white",
|
Background = "white",
|
||||||
BorderType = BorderType.BorderStroke,
|
BorderType = BorderType.BorderStroke,
|
||||||
ShadowBlur = ShadowBlur,
|
BorderStroke = "0",
|
||||||
|
//ShadowBlur = ShadowBlur,
|
||||||
ShadowColor = Color.FromRgba(0, 0, 0, 150),
|
ShadowColor = Color.FromRgba(0, 0, 0, 150),
|
||||||
Child = new Decorator
|
Child = new Decorator
|
||||||
{
|
{
|
||||||
@ -420,9 +421,19 @@ namespace CPF.Toolkit.Controls
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
[nameof(ShadowBlur)] = new BindingDescribe(this, nameof(WindowState), BindingMode.OneWay, x => ((WindowState)x).Or(WindowState.Maximized, WindowState.FullScreen) ? 0 : ShadowBlur),
|
[nameof(ShadowBlur)] = new BindingDescribe(this, nameof(WindowState), BindingMode.OneWay, x => ((WindowState)x).Or(WindowState.Maximized, WindowState.FullScreen) ? 0 : ShadowBlur),
|
||||||
[nameof(ShadowBlur)] = new BindingDescribe(this, nameof(IsFocused), BindingMode.OneWay, x => ((bool)x) ? ShadowBlur : 0),
|
Triggers =
|
||||||
[nameof(BorderStroke)] = new BindingDescribe(this, nameof(IsFocused), BindingMode.OneWay, x => ((bool)x) ? "0" : "1"),
|
{
|
||||||
[nameof(BorderFill)] = new BindingDescribe(this, nameof(IsFocused), BindingMode.OneWay, x => ((bool)x) ? null : "0,0,0,100"),
|
new Trigger
|
||||||
|
{
|
||||||
|
Property = nameof(IsFocused),
|
||||||
|
Setters =
|
||||||
|
{
|
||||||
|
{ nameof(ShadowBlur),ShadowBlur },
|
||||||
|
{ nameof(BorderStroke),"1" },
|
||||||
|
{ nameof(BorderFill),"0,0,0,100" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ using CPF.Svg;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace CPF.Toolkit.Dialogs
|
namespace CPF.Toolkit.Dialogs
|
||||||
@ -119,6 +120,8 @@ namespace CPF.Toolkit.Dialogs
|
|||||||
frame.ControlBoxStroke = "black";
|
frame.ControlBoxStroke = "black";
|
||||||
frame.CaptionBackgrund = "white";
|
frame.CaptionBackgrund = "white";
|
||||||
frame.CaptionForeground = "black";
|
frame.CaptionForeground = "black";
|
||||||
|
frame.MinimizeBox = false;
|
||||||
|
frame.MaximizeBox = false;
|
||||||
|
|
||||||
textBox.TextChanged += TextBox_TextChanged;
|
textBox.TextChanged += TextBox_TextChanged;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user