8 files changed
+39
-39
No files matched your search
@@ -43,10 +43,10 @@ namespace HandyControl.Controls
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
ClearValue(SelectedValueProperty);
|
||||
ClearValue(SelectedItemProperty);
|
||||
ClearValue(SelectedIndexProperty);
|
||||
ClearValue(TextProperty);
|
||||
SetCurrentValue(SelectedValueProperty, null);
|
||||
SetCurrentValue(SelectedItemProperty, null);
|
||||
SetCurrentValue(SelectedIndexProperty, -1);
|
||||
SetCurrentValue(TextProperty, "");
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace HandyControl.Controls
|
||||
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
|
||||
Mode = BindingMode.OneWayToSource,
|
||||
#if !netle40
|
||||
Delay = 500,
|
||||
Delay = 500,
|
||||
#endif
|
||||
Source = this
|
||||
});
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace HandyControl.Controls
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
ClearValue(SelectedDateProperty);
|
||||
ClearValue(TextProperty);
|
||||
SetCurrentValue(SelectedDateProperty, null);
|
||||
SetCurrentValue(TextProperty, "");
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ namespace HandyControl.Controls
|
||||
InitCalendarWithClock();
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
ClearValue(SelectedDateTimeProperty);
|
||||
ClearValue(TextProperty);
|
||||
SetCurrentValue(SelectedDateTimeProperty, null);
|
||||
SetCurrentValue(TextProperty, "");
|
||||
_textBox.Text = string.Empty;
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace HandyControl.Controls
|
||||
}));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
ClearValue(ValueProperty);
|
||||
SetCurrentValue(ValueProperty, 0d);
|
||||
_textBox.Text = string.Empty;
|
||||
}));
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
ClearValue(TextProperty);
|
||||
SetCurrentValue(TextProperty, "");
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ namespace HandyControl.Controls
|
||||
Clock = new Clock();
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
ClearValue(SelectedTimeProperty);
|
||||
ClearValue(TextProperty);
|
||||
SetCurrentValue(SelectedTimeProperty, null);
|
||||
SetCurrentValue(TextProperty, "");
|
||||
_textBox.Text = string.Empty;
|
||||
}));
|
||||
}
|
||||
@@ -261,7 +261,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public bool IsError
|
||||
{
|
||||
get => (bool) GetValue(IsErrorProperty);
|
||||
get => (bool)GetValue(IsErrorProperty);
|
||||
set => SetValue(IsErrorProperty, value);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public string ErrorStr
|
||||
{
|
||||
get => (string) GetValue(ErrorStrProperty);
|
||||
get => (string)GetValue(ErrorStrProperty);
|
||||
set => SetValue(ErrorStrProperty, value);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public TextType TextType
|
||||
{
|
||||
get => (TextType) GetValue(TextTypeProperty);
|
||||
get => (TextType)GetValue(TextTypeProperty);
|
||||
set => SetValue(TextTypeProperty, value);
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public bool ShowClearButton
|
||||
{
|
||||
get => (bool) GetValue(ShowClearButtonProperty);
|
||||
get => (bool)GetValue(ShowClearButtonProperty);
|
||||
set => SetValue(ShowClearButtonProperty, value);
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnClockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (TimePicker) d;
|
||||
var ctl = (TimePicker)d;
|
||||
var oldClock = e.OldValue as ClockBase;
|
||||
var newClock = e.NewValue as ClockBase;
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace HandyControl.Controls
|
||||
|
||||
public ClockBase Clock
|
||||
{
|
||||
get => (ClockBase) GetValue(ClockProperty);
|
||||
get => (ClockBase)GetValue(ClockProperty);
|
||||
set => SetValue(ClockProperty, value);
|
||||
}
|
||||
|
||||
@@ -497,29 +497,29 @@ namespace HandyControl.Controls
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.System:
|
||||
{
|
||||
switch (e.SystemKey)
|
||||
{
|
||||
case Key.Down:
|
||||
switch (e.SystemKey)
|
||||
{
|
||||
if ((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt)
|
||||
{
|
||||
TogglePopUp();
|
||||
return true;
|
||||
}
|
||||
case Key.Down:
|
||||
{
|
||||
if ((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt)
|
||||
{
|
||||
TogglePopUp();
|
||||
return true;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Key.Enter:
|
||||
{
|
||||
SetSelectedTime();
|
||||
return true;
|
||||
}
|
||||
{
|
||||
SetSelectedTime();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -644,7 +644,7 @@ namespace HandyControl.Controls
|
||||
|
||||
if (SelectedTime != null)
|
||||
{
|
||||
var newtext = DateTimeToString((DateTime) SelectedTime);
|
||||
var newtext = DateTimeToString((DateTime)SelectedTime);
|
||||
SafeSetText(newtext);
|
||||
return SelectedTime;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
if (IsEnableAnimation)
|
||||
{
|
||||
_headerPanel.ClearValue(TabPanel.FluidMoveDurationProperty);
|
||||
_headerPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,7 +311,7 @@ namespace HandyControl.Controls
|
||||
Items.Insert(0, item);
|
||||
if (IsEnableAnimation)
|
||||
{
|
||||
_headerPanel.ClearValue(TabPanel.FluidMoveDurationProperty);
|
||||
_headerPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace HandyControl.Controls
|
||||
|
||||
if (TabControlParent.IsEnableAnimation)
|
||||
{
|
||||
TabPanel.ClearValue(TabPanel.FluidMoveDurationProperty);
|
||||
TabPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user