mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-04-05 17:37:51 +08:00
1
This commit is contained in:
parent
9ab836ff44
commit
49b1ebcd5c
@ -31,14 +31,47 @@ namespace CPF.Toolkit.Controls
|
||||
ItemsPanel = new StackPanel { Orientation = Orientation.Horizontal },
|
||||
ItemTemplate = new ListBoxItem
|
||||
{
|
||||
Height = "100%",
|
||||
Width = 100,
|
||||
MarginRight = 1,
|
||||
FontSize = 16f,
|
||||
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,
|
||||
[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,
|
||||
[nameof(ListBox.SelectedValue)] = new BindingDescribe(this, nameof(this.SelectWindow), BindingMode.TwoWay),
|
||||
@ -73,13 +106,13 @@ namespace CPF.Toolkit.Controls
|
||||
case TaskBarPlacement.Top:
|
||||
this.RowDefinitions.Add(new RowDefinition { Height = 35 });
|
||||
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||
RowIndex(this.taskBar,0);
|
||||
RowIndex(this.taskBar, 0);
|
||||
RowIndex(this.host, 1);
|
||||
break;
|
||||
case TaskBarPlacement.Bottom:
|
||||
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
|
||||
this.RowDefinitions.Add(new RowDefinition { Height = 35 });
|
||||
RowIndex(this.host,0);
|
||||
RowIndex(this.host, 0);
|
||||
RowIndex(this.taskBar, 1);
|
||||
break;
|
||||
}
|
||||
|
@ -80,7 +80,8 @@ namespace CPF.Toolkit.Controls
|
||||
Size = SizeField.Fill,
|
||||
Background = "white",
|
||||
BorderType = BorderType.BorderStroke,
|
||||
ShadowBlur = ShadowBlur,
|
||||
BorderStroke = "0",
|
||||
//ShadowBlur = ShadowBlur,
|
||||
ShadowColor = Color.FromRgba(0, 0, 0, 150),
|
||||
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(IsFocused), BindingMode.OneWay, x => ((bool)x) ? ShadowBlur : 0),
|
||||
[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"),
|
||||
Triggers =
|
||||
{
|
||||
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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace CPF.Toolkit.Dialogs
|
||||
@ -119,6 +120,8 @@ namespace CPF.Toolkit.Dialogs
|
||||
frame.ControlBoxStroke = "black";
|
||||
frame.CaptionBackgrund = "white";
|
||||
frame.CaptionForeground = "black";
|
||||
frame.MinimizeBox = false;
|
||||
frame.MaximizeBox = false;
|
||||
|
||||
textBox.TextChanged += TextBox_TextChanged;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user