Automated dotnet-format update
This commit is contained in:
1 parent
ad4c2f68aa
commit
2af18c2d38
403 files changed
+1569
-1567
No files matched your search
@@ -22,4 +22,4 @@ public class DemoHelper
|
|||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ namespace HandyControlDemo
|
|||||||
public partial class App
|
public partial class App
|
||||||
{
|
{
|
||||||
#pragma warning disable IDE0052
|
#pragma warning disable IDE0052
|
||||||
[SuppressMessage("ReSharper", "NotAccessedField.Local")]
|
[SuppressMessage("ReSharper", "NotAccessedField.Local")]
|
||||||
private static Mutex AppMutex;
|
private static Mutex AppMutex;
|
||||||
#pragma warning restore IDE0052
|
#pragma warning restore IDE0052
|
||||||
|
|
||||||
@@ -92,18 +92,18 @@ namespace HandyControlDemo
|
|||||||
{
|
{
|
||||||
var skins0 = Resources.MergedDictionaries[0];
|
var skins0 = Resources.MergedDictionaries[0];
|
||||||
skins0.MergedDictionaries.Clear();
|
skins0.MergedDictionaries.Clear();
|
||||||
skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(skin));
|
skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(skin));
|
||||||
skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skin));
|
skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skin));
|
||||||
|
|
||||||
var skins1 = Resources.MergedDictionaries[1];
|
var skins1 = Resources.MergedDictionaries[1];
|
||||||
skins1.MergedDictionaries.Clear();
|
skins1.MergedDictionaries.Clear();
|
||||||
skins1.MergedDictionaries.Add(new ResourceDictionary
|
skins1.MergedDictionaries.Add(new ResourceDictionary
|
||||||
{
|
{
|
||||||
Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
|
Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
|
||||||
});
|
});
|
||||||
skins1.MergedDictionaries.Add(new ResourceDictionary
|
skins1.MergedDictionaries.Add(new ResourceDictionary
|
||||||
{
|
{
|
||||||
Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml")
|
Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml")
|
||||||
});
|
});
|
||||||
|
|
||||||
Current.MainWindow?.OnApplyTemplate();
|
Current.MainWindow?.OnApplyTemplate();
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public SkinType Skin { get; set; }
|
public SkinType Skin { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,4 +10,4 @@ namespace HandyControlDemo.Data
|
|||||||
Type5,
|
Type5,
|
||||||
Type6
|
Type6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,4 +35,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public static bool NotifyIconIsShow { get; set; }
|
public static bool NotifyIconIsShow { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
namespace HandyControlDemo.Data
|
namespace HandyControlDemo.Data
|
||||||
{
|
{
|
||||||
public class MessageToken
|
public class MessageToken
|
||||||
{
|
{
|
||||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||||
|
|
||||||
public static readonly string FullSwitch = nameof(FullSwitch);
|
public static readonly string FullSwitch = nameof(FullSwitch);
|
||||||
|
|
||||||
@@ -51,4 +51,4 @@
|
|||||||
public static readonly string LangUpdated = nameof(LangUpdated);
|
public static readonly string LangUpdated = nameof(LangUpdated);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public string AvatarUri { get; set; }
|
public string AvatarUri { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,4 +14,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public object Enclosure { get; set; }
|
public object Enclosure { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
public string BackgroundToken { get; set; }
|
public string BackgroundToken { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,4 +19,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public List<DemoDataModel> DataList { get; set; }
|
public List<DemoDataModel> DataList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,4 +33,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public IList<DemoItemModel> DemoItemList { get; set; }
|
public IList<DemoItemModel> DemoItemList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,4 +10,4 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
public bool Line { get; set; }
|
public bool Line { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -30,4 +30,4 @@ namespace HandyControlDemo.Data
|
|||||||
Male,
|
Male,
|
||||||
Female
|
Female
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,4 +51,4 @@ namespace HandyControlDemo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,224 +35,224 @@ namespace HandyControlDemo.Properties.Langs
|
|||||||
Mode = BindingMode.OneWay
|
Mode = BindingMode.OneWay
|
||||||
});
|
});
|
||||||
|
|
||||||
private void UpdateLangs()
|
private void UpdateLangs()
|
||||||
{
|
{
|
||||||
OnPropertyChanged(nameof(About));
|
OnPropertyChanged(nameof(About));
|
||||||
OnPropertyChanged(nameof(AddItem));
|
OnPropertyChanged(nameof(AddItem));
|
||||||
OnPropertyChanged(nameof(AnimationPath));
|
OnPropertyChanged(nameof(AnimationPath));
|
||||||
OnPropertyChanged(nameof(AppClosingTip));
|
OnPropertyChanged(nameof(AppClosingTip));
|
||||||
OnPropertyChanged(nameof(Ask));
|
OnPropertyChanged(nameof(Ask));
|
||||||
OnPropertyChanged(nameof(Badge));
|
OnPropertyChanged(nameof(Badge));
|
||||||
OnPropertyChanged(nameof(BasicInfo));
|
OnPropertyChanged(nameof(BasicInfo));
|
||||||
OnPropertyChanged(nameof(BasicLayout));
|
OnPropertyChanged(nameof(BasicLayout));
|
||||||
OnPropertyChanged(nameof(Blink));
|
OnPropertyChanged(nameof(Blink));
|
||||||
OnPropertyChanged(nameof(Blog));
|
OnPropertyChanged(nameof(Blog));
|
||||||
OnPropertyChanged(nameof(Border));
|
OnPropertyChanged(nameof(Border));
|
||||||
OnPropertyChanged(nameof(Brush));
|
OnPropertyChanged(nameof(Brush));
|
||||||
OnPropertyChanged(nameof(Button));
|
OnPropertyChanged(nameof(Button));
|
||||||
OnPropertyChanged(nameof(ButtonCustom));
|
OnPropertyChanged(nameof(ButtonCustom));
|
||||||
OnPropertyChanged(nameof(ButtonGroup));
|
OnPropertyChanged(nameof(ButtonGroup));
|
||||||
OnPropertyChanged(nameof(Calendar));
|
OnPropertyChanged(nameof(Calendar));
|
||||||
OnPropertyChanged(nameof(CalendarWithClock));
|
OnPropertyChanged(nameof(CalendarWithClock));
|
||||||
OnPropertyChanged(nameof(Card));
|
OnPropertyChanged(nameof(Card));
|
||||||
OnPropertyChanged(nameof(Carousel));
|
OnPropertyChanged(nameof(Carousel));
|
||||||
OnPropertyChanged(nameof(ChangeLangAsk));
|
OnPropertyChanged(nameof(ChangeLangAsk));
|
||||||
OnPropertyChanged(nameof(ChatBubble));
|
OnPropertyChanged(nameof(ChatBubble));
|
||||||
OnPropertyChanged(nameof(Chatroom));
|
OnPropertyChanged(nameof(Chatroom));
|
||||||
OnPropertyChanged(nameof(CheckBox));
|
OnPropertyChanged(nameof(CheckBox));
|
||||||
OnPropertyChanged(nameof(CheckComboBox));
|
OnPropertyChanged(nameof(CheckComboBox));
|
||||||
OnPropertyChanged(nameof(CirclePanel));
|
OnPropertyChanged(nameof(CirclePanel));
|
||||||
OnPropertyChanged(nameof(Clear));
|
OnPropertyChanged(nameof(Clear));
|
||||||
OnPropertyChanged(nameof(Click2Count));
|
OnPropertyChanged(nameof(Click2Count));
|
||||||
OnPropertyChanged(nameof(Clock));
|
OnPropertyChanged(nameof(Clock));
|
||||||
OnPropertyChanged(nameof(ColorPicker));
|
OnPropertyChanged(nameof(ColorPicker));
|
||||||
OnPropertyChanged(nameof(ColumnOffset));
|
OnPropertyChanged(nameof(ColumnOffset));
|
||||||
OnPropertyChanged(nameof(ColumnSpacing));
|
OnPropertyChanged(nameof(ColumnSpacing));
|
||||||
OnPropertyChanged(nameof(ComboBox));
|
OnPropertyChanged(nameof(ComboBox));
|
||||||
OnPropertyChanged(nameof(ComingSoon));
|
OnPropertyChanged(nameof(ComingSoon));
|
||||||
OnPropertyChanged(nameof(Comment));
|
OnPropertyChanged(nameof(Comment));
|
||||||
OnPropertyChanged(nameof(Common));
|
OnPropertyChanged(nameof(Common));
|
||||||
OnPropertyChanged(nameof(CompareSlider));
|
OnPropertyChanged(nameof(CompareSlider));
|
||||||
OnPropertyChanged(nameof(Complete));
|
OnPropertyChanged(nameof(Complete));
|
||||||
OnPropertyChanged(nameof(ContentDemoStr));
|
OnPropertyChanged(nameof(ContentDemoStr));
|
||||||
OnPropertyChanged(nameof(Contributors));
|
OnPropertyChanged(nameof(Contributors));
|
||||||
OnPropertyChanged(nameof(Controls));
|
OnPropertyChanged(nameof(Controls));
|
||||||
OnPropertyChanged(nameof(CoverFlow));
|
OnPropertyChanged(nameof(CoverFlow));
|
||||||
OnPropertyChanged(nameof(CoverView));
|
OnPropertyChanged(nameof(CoverView));
|
||||||
OnPropertyChanged(nameof(Danger));
|
OnPropertyChanged(nameof(Danger));
|
||||||
OnPropertyChanged(nameof(DataGrid));
|
OnPropertyChanged(nameof(DataGrid));
|
||||||
OnPropertyChanged(nameof(DatePicker));
|
OnPropertyChanged(nameof(DatePicker));
|
||||||
OnPropertyChanged(nameof(DateTimePicker));
|
OnPropertyChanged(nameof(DateTimePicker));
|
||||||
OnPropertyChanged(nameof(Default));
|
OnPropertyChanged(nameof(Default));
|
||||||
OnPropertyChanged(nameof(Demo));
|
OnPropertyChanged(nameof(Demo));
|
||||||
OnPropertyChanged(nameof(Dialog));
|
OnPropertyChanged(nameof(Dialog));
|
||||||
OnPropertyChanged(nameof(DialogDemo));
|
OnPropertyChanged(nameof(DialogDemo));
|
||||||
OnPropertyChanged(nameof(Divider));
|
OnPropertyChanged(nameof(Divider));
|
||||||
OnPropertyChanged(nameof(Doc_cn));
|
OnPropertyChanged(nameof(Doc_cn));
|
||||||
OnPropertyChanged(nameof(Doc_en));
|
OnPropertyChanged(nameof(Doc_en));
|
||||||
OnPropertyChanged(nameof(Documentation));
|
OnPropertyChanged(nameof(Documentation));
|
||||||
OnPropertyChanged(nameof(DragHere));
|
OnPropertyChanged(nameof(DragHere));
|
||||||
OnPropertyChanged(nameof(Drawer));
|
OnPropertyChanged(nameof(Drawer));
|
||||||
OnPropertyChanged(nameof(Effects));
|
OnPropertyChanged(nameof(Effects));
|
||||||
OnPropertyChanged(nameof(Email));
|
OnPropertyChanged(nameof(Email));
|
||||||
OnPropertyChanged(nameof(Error));
|
OnPropertyChanged(nameof(Error));
|
||||||
OnPropertyChanged(nameof(Exit));
|
OnPropertyChanged(nameof(Exit));
|
||||||
OnPropertyChanged(nameof(Expander));
|
OnPropertyChanged(nameof(Expander));
|
||||||
OnPropertyChanged(nameof(Fatal));
|
OnPropertyChanged(nameof(Fatal));
|
||||||
OnPropertyChanged(nameof(FlexPanel));
|
OnPropertyChanged(nameof(FlexPanel));
|
||||||
OnPropertyChanged(nameof(FlipClock));
|
OnPropertyChanged(nameof(FlipClock));
|
||||||
OnPropertyChanged(nameof(FloatingBlock));
|
OnPropertyChanged(nameof(FloatingBlock));
|
||||||
OnPropertyChanged(nameof(FlowDocument));
|
OnPropertyChanged(nameof(FlowDocument));
|
||||||
OnPropertyChanged(nameof(FlowDocumentPageViewer));
|
OnPropertyChanged(nameof(FlowDocumentPageViewer));
|
||||||
OnPropertyChanged(nameof(FlowDocumentReader));
|
OnPropertyChanged(nameof(FlowDocumentReader));
|
||||||
OnPropertyChanged(nameof(FlowDocumentScrollViewer));
|
OnPropertyChanged(nameof(FlowDocumentScrollViewer));
|
||||||
OnPropertyChanged(nameof(Frame));
|
OnPropertyChanged(nameof(Frame));
|
||||||
OnPropertyChanged(nameof(Geometry));
|
OnPropertyChanged(nameof(Geometry));
|
||||||
OnPropertyChanged(nameof(GifImage));
|
OnPropertyChanged(nameof(GifImage));
|
||||||
OnPropertyChanged(nameof(GotoTop));
|
OnPropertyChanged(nameof(GotoTop));
|
||||||
OnPropertyChanged(nameof(Gravatar));
|
OnPropertyChanged(nameof(Gravatar));
|
||||||
OnPropertyChanged(nameof(Grid));
|
OnPropertyChanged(nameof(Grid));
|
||||||
OnPropertyChanged(nameof(GroupBox));
|
OnPropertyChanged(nameof(GroupBox));
|
||||||
OnPropertyChanged(nameof(Groups));
|
OnPropertyChanged(nameof(Groups));
|
||||||
OnPropertyChanged(nameof(Growl));
|
OnPropertyChanged(nameof(Growl));
|
||||||
OnPropertyChanged(nameof(GrowlAsk));
|
OnPropertyChanged(nameof(GrowlAsk));
|
||||||
OnPropertyChanged(nameof(GrowlDemo));
|
OnPropertyChanged(nameof(GrowlDemo));
|
||||||
OnPropertyChanged(nameof(GrowlError));
|
OnPropertyChanged(nameof(GrowlError));
|
||||||
OnPropertyChanged(nameof(GrowlFatal));
|
OnPropertyChanged(nameof(GrowlFatal));
|
||||||
OnPropertyChanged(nameof(GrowlInfo));
|
OnPropertyChanged(nameof(GrowlInfo));
|
||||||
OnPropertyChanged(nameof(GrowlSuccess));
|
OnPropertyChanged(nameof(GrowlSuccess));
|
||||||
OnPropertyChanged(nameof(GrowlWarning));
|
OnPropertyChanged(nameof(GrowlWarning));
|
||||||
OnPropertyChanged(nameof(HatchBrushGenerator));
|
OnPropertyChanged(nameof(HatchBrushGenerator));
|
||||||
OnPropertyChanged(nameof(HoneycombPanel));
|
OnPropertyChanged(nameof(HoneycombPanel));
|
||||||
OnPropertyChanged(nameof(HybridLayout));
|
OnPropertyChanged(nameof(HybridLayout));
|
||||||
OnPropertyChanged(nameof(Ignore));
|
OnPropertyChanged(nameof(Ignore));
|
||||||
OnPropertyChanged(nameof(ImageBlock));
|
OnPropertyChanged(nameof(ImageBlock));
|
||||||
OnPropertyChanged(nameof(ImageBrowser));
|
OnPropertyChanged(nameof(ImageBrowser));
|
||||||
OnPropertyChanged(nameof(ImageSelector));
|
OnPropertyChanged(nameof(ImageSelector));
|
||||||
OnPropertyChanged(nameof(Index));
|
OnPropertyChanged(nameof(Index));
|
||||||
OnPropertyChanged(nameof(Info));
|
OnPropertyChanged(nameof(Info));
|
||||||
OnPropertyChanged(nameof(InteractiveDialog));
|
OnPropertyChanged(nameof(InteractiveDialog));
|
||||||
OnPropertyChanged(nameof(IsNotPhone));
|
OnPropertyChanged(nameof(IsNotPhone));
|
||||||
OnPropertyChanged(nameof(Label));
|
OnPropertyChanged(nameof(Label));
|
||||||
OnPropertyChanged(nameof(LangComment));
|
OnPropertyChanged(nameof(LangComment));
|
||||||
OnPropertyChanged(nameof(ListBox));
|
OnPropertyChanged(nameof(ListBox));
|
||||||
OnPropertyChanged(nameof(ListView));
|
OnPropertyChanged(nameof(ListView));
|
||||||
OnPropertyChanged(nameof(Loading));
|
OnPropertyChanged(nameof(Loading));
|
||||||
OnPropertyChanged(nameof(Magnifier));
|
OnPropertyChanged(nameof(Magnifier));
|
||||||
OnPropertyChanged(nameof(Menu));
|
OnPropertyChanged(nameof(Menu));
|
||||||
OnPropertyChanged(nameof(MessageBox));
|
OnPropertyChanged(nameof(MessageBox));
|
||||||
OnPropertyChanged(nameof(Morphing_Animation));
|
OnPropertyChanged(nameof(Morphing_Animation));
|
||||||
OnPropertyChanged(nameof(Name));
|
OnPropertyChanged(nameof(Name));
|
||||||
OnPropertyChanged(nameof(NewWindow));
|
OnPropertyChanged(nameof(NewWindow));
|
||||||
OnPropertyChanged(nameof(Next));
|
OnPropertyChanged(nameof(Next));
|
||||||
OnPropertyChanged(nameof(Notification));
|
OnPropertyChanged(nameof(Notification));
|
||||||
OnPropertyChanged(nameof(NotifyIcon));
|
OnPropertyChanged(nameof(NotifyIcon));
|
||||||
OnPropertyChanged(nameof(NumericUpDown));
|
OnPropertyChanged(nameof(NumericUpDown));
|
||||||
OnPropertyChanged(nameof(Off));
|
OnPropertyChanged(nameof(Off));
|
||||||
OnPropertyChanged(nameof(Ok));
|
OnPropertyChanged(nameof(Ok));
|
||||||
OnPropertyChanged(nameof(On));
|
OnPropertyChanged(nameof(On));
|
||||||
OnPropertyChanged(nameof(OpenBlurWindow));
|
OnPropertyChanged(nameof(OpenBlurWindow));
|
||||||
OnPropertyChanged(nameof(OpenCommonWindow));
|
OnPropertyChanged(nameof(OpenCommonWindow));
|
||||||
OnPropertyChanged(nameof(OpenCustomContentWindow));
|
OnPropertyChanged(nameof(OpenCustomContentWindow));
|
||||||
OnPropertyChanged(nameof(OpenCustomMessageWindow));
|
OnPropertyChanged(nameof(OpenCustomMessageWindow));
|
||||||
OnPropertyChanged(nameof(OpenCustomNonClientAreaWindow));
|
OnPropertyChanged(nameof(OpenCustomNonClientAreaWindow));
|
||||||
OnPropertyChanged(nameof(OpenGlowWindow));
|
OnPropertyChanged(nameof(OpenGlowWindow));
|
||||||
OnPropertyChanged(nameof(OpenImageBrowser));
|
OnPropertyChanged(nameof(OpenImageBrowser));
|
||||||
OnPropertyChanged(nameof(OpenMessageWindow));
|
OnPropertyChanged(nameof(OpenMessageWindow));
|
||||||
OnPropertyChanged(nameof(OpenMouseFollowWindow));
|
OnPropertyChanged(nameof(OpenMouseFollowWindow));
|
||||||
OnPropertyChanged(nameof(OpenNativeCommonWindow));
|
OnPropertyChanged(nameof(OpenNativeCommonWindow));
|
||||||
OnPropertyChanged(nameof(OpenNavigationWindow));
|
OnPropertyChanged(nameof(OpenNavigationWindow));
|
||||||
OnPropertyChanged(nameof(OpenNoNonClientAreaDragableWindow));
|
OnPropertyChanged(nameof(OpenNoNonClientAreaDragableWindow));
|
||||||
OnPropertyChanged(nameof(OpenPanel));
|
OnPropertyChanged(nameof(OpenPanel));
|
||||||
OnPropertyChanged(nameof(OpenSprite));
|
OnPropertyChanged(nameof(OpenSprite));
|
||||||
OnPropertyChanged(nameof(OutlineText));
|
OnPropertyChanged(nameof(OutlineText));
|
||||||
OnPropertyChanged(nameof(Pagination));
|
OnPropertyChanged(nameof(Pagination));
|
||||||
OnPropertyChanged(nameof(PasswordBox));
|
OnPropertyChanged(nameof(PasswordBox));
|
||||||
OnPropertyChanged(nameof(PinBox));
|
OnPropertyChanged(nameof(PinBox));
|
||||||
OnPropertyChanged(nameof(PleaseInput));
|
OnPropertyChanged(nameof(PleaseInput));
|
||||||
OnPropertyChanged(nameof(PleaseWait));
|
OnPropertyChanged(nameof(PleaseWait));
|
||||||
OnPropertyChanged(nameof(PlsEnterContent));
|
OnPropertyChanged(nameof(PlsEnterContent));
|
||||||
OnPropertyChanged(nameof(PlsEnterEmail));
|
OnPropertyChanged(nameof(PlsEnterEmail));
|
||||||
OnPropertyChanged(nameof(PlsEnterKey));
|
OnPropertyChanged(nameof(PlsEnterKey));
|
||||||
OnPropertyChanged(nameof(Poptip));
|
OnPropertyChanged(nameof(Poptip));
|
||||||
OnPropertyChanged(nameof(PoptipPositionStr));
|
OnPropertyChanged(nameof(PoptipPositionStr));
|
||||||
OnPropertyChanged(nameof(PracticalDemos));
|
OnPropertyChanged(nameof(PracticalDemos));
|
||||||
OnPropertyChanged(nameof(Prev));
|
OnPropertyChanged(nameof(Prev));
|
||||||
OnPropertyChanged(nameof(PreviewSlider));
|
OnPropertyChanged(nameof(PreviewSlider));
|
||||||
OnPropertyChanged(nameof(Primary));
|
OnPropertyChanged(nameof(Primary));
|
||||||
OnPropertyChanged(nameof(ProgressBar));
|
OnPropertyChanged(nameof(ProgressBar));
|
||||||
OnPropertyChanged(nameof(ProgressButton));
|
OnPropertyChanged(nameof(ProgressButton));
|
||||||
OnPropertyChanged(nameof(Project));
|
OnPropertyChanged(nameof(Project));
|
||||||
OnPropertyChanged(nameof(PropertyGrid));
|
OnPropertyChanged(nameof(PropertyGrid));
|
||||||
OnPropertyChanged(nameof(PushToTalk));
|
OnPropertyChanged(nameof(PushToTalk));
|
||||||
OnPropertyChanged(nameof(QQGroup));
|
OnPropertyChanged(nameof(QQGroup));
|
||||||
OnPropertyChanged(nameof(RadioButton));
|
OnPropertyChanged(nameof(RadioButton));
|
||||||
OnPropertyChanged(nameof(RangeSlider));
|
OnPropertyChanged(nameof(RangeSlider));
|
||||||
OnPropertyChanged(nameof(Rate));
|
OnPropertyChanged(nameof(Rate));
|
||||||
OnPropertyChanged(nameof(Recommendation));
|
OnPropertyChanged(nameof(Recommendation));
|
||||||
OnPropertyChanged(nameof(Register));
|
OnPropertyChanged(nameof(Register));
|
||||||
OnPropertyChanged(nameof(RelativePanel));
|
OnPropertyChanged(nameof(RelativePanel));
|
||||||
OnPropertyChanged(nameof(Remark));
|
OnPropertyChanged(nameof(Remark));
|
||||||
OnPropertyChanged(nameof(RemoveItem));
|
OnPropertyChanged(nameof(RemoveItem));
|
||||||
OnPropertyChanged(nameof(RepeatButton));
|
OnPropertyChanged(nameof(RepeatButton));
|
||||||
OnPropertyChanged(nameof(Reply));
|
OnPropertyChanged(nameof(Reply));
|
||||||
OnPropertyChanged(nameof(Repository));
|
OnPropertyChanged(nameof(Repository));
|
||||||
OnPropertyChanged(nameof(ResponsiveLayout));
|
OnPropertyChanged(nameof(ResponsiveLayout));
|
||||||
OnPropertyChanged(nameof(RichTextBox));
|
OnPropertyChanged(nameof(RichTextBox));
|
||||||
OnPropertyChanged(nameof(RightClickHere));
|
OnPropertyChanged(nameof(RightClickHere));
|
||||||
OnPropertyChanged(nameof(RunningBlock));
|
OnPropertyChanged(nameof(RunningBlock));
|
||||||
OnPropertyChanged(nameof(Screenshot));
|
OnPropertyChanged(nameof(Screenshot));
|
||||||
OnPropertyChanged(nameof(ScrollViewer));
|
OnPropertyChanged(nameof(ScrollViewer));
|
||||||
OnPropertyChanged(nameof(SearchBar));
|
OnPropertyChanged(nameof(SearchBar));
|
||||||
OnPropertyChanged(nameof(Second));
|
OnPropertyChanged(nameof(Second));
|
||||||
OnPropertyChanged(nameof(Selected));
|
OnPropertyChanged(nameof(Selected));
|
||||||
OnPropertyChanged(nameof(SendNotification));
|
OnPropertyChanged(nameof(SendNotification));
|
||||||
OnPropertyChanged(nameof(Shield));
|
OnPropertyChanged(nameof(Shield));
|
||||||
OnPropertyChanged(nameof(ShowInCurrentWindow));
|
OnPropertyChanged(nameof(ShowInCurrentWindow));
|
||||||
OnPropertyChanged(nameof(ShowInMainWindow));
|
OnPropertyChanged(nameof(ShowInMainWindow));
|
||||||
OnPropertyChanged(nameof(ShowRowNumber));
|
OnPropertyChanged(nameof(ShowRowNumber));
|
||||||
OnPropertyChanged(nameof(SideMenu));
|
OnPropertyChanged(nameof(SideMenu));
|
||||||
OnPropertyChanged(nameof(Slider));
|
OnPropertyChanged(nameof(Slider));
|
||||||
OnPropertyChanged(nameof(SplitButton));
|
OnPropertyChanged(nameof(SplitButton));
|
||||||
OnPropertyChanged(nameof(Sprite));
|
OnPropertyChanged(nameof(Sprite));
|
||||||
OnPropertyChanged(nameof(StartScreenshot));
|
OnPropertyChanged(nameof(StartScreenshot));
|
||||||
OnPropertyChanged(nameof(StaysOpen));
|
OnPropertyChanged(nameof(StaysOpen));
|
||||||
OnPropertyChanged(nameof(Step));
|
OnPropertyChanged(nameof(Step));
|
||||||
OnPropertyChanged(nameof(StepBar));
|
OnPropertyChanged(nameof(StepBar));
|
||||||
OnPropertyChanged(nameof(Styles));
|
OnPropertyChanged(nameof(Styles));
|
||||||
OnPropertyChanged(nameof(SubTitle));
|
OnPropertyChanged(nameof(SubTitle));
|
||||||
OnPropertyChanged(nameof(Success));
|
OnPropertyChanged(nameof(Success));
|
||||||
OnPropertyChanged(nameof(TabControl));
|
OnPropertyChanged(nameof(TabControl));
|
||||||
OnPropertyChanged(nameof(Tag));
|
OnPropertyChanged(nameof(Tag));
|
||||||
OnPropertyChanged(nameof(Text));
|
OnPropertyChanged(nameof(Text));
|
||||||
OnPropertyChanged(nameof(TextBlock));
|
OnPropertyChanged(nameof(TextBlock));
|
||||||
OnPropertyChanged(nameof(TextBox));
|
OnPropertyChanged(nameof(TextBox));
|
||||||
OnPropertyChanged(nameof(TextDialog));
|
OnPropertyChanged(nameof(TextDialog));
|
||||||
OnPropertyChanged(nameof(TextDialogInControl));
|
OnPropertyChanged(nameof(TextDialogInControl));
|
||||||
OnPropertyChanged(nameof(TextDialogWithTimer));
|
OnPropertyChanged(nameof(TextDialogWithTimer));
|
||||||
OnPropertyChanged(nameof(TimeBar));
|
OnPropertyChanged(nameof(TimeBar));
|
||||||
OnPropertyChanged(nameof(TimePicker));
|
OnPropertyChanged(nameof(TimePicker));
|
||||||
OnPropertyChanged(nameof(Tip));
|
OnPropertyChanged(nameof(Tip));
|
||||||
OnPropertyChanged(nameof(Title));
|
OnPropertyChanged(nameof(Title));
|
||||||
OnPropertyChanged(nameof(TitleDemoStr1));
|
OnPropertyChanged(nameof(TitleDemoStr1));
|
||||||
OnPropertyChanged(nameof(TitleDemoStr2));
|
OnPropertyChanged(nameof(TitleDemoStr2));
|
||||||
OnPropertyChanged(nameof(TitleDemoStr3));
|
OnPropertyChanged(nameof(TitleDemoStr3));
|
||||||
OnPropertyChanged(nameof(ToggleButton));
|
OnPropertyChanged(nameof(ToggleButton));
|
||||||
OnPropertyChanged(nameof(ToolBar));
|
OnPropertyChanged(nameof(ToolBar));
|
||||||
OnPropertyChanged(nameof(Tools));
|
OnPropertyChanged(nameof(Tools));
|
||||||
OnPropertyChanged(nameof(Transfer));
|
OnPropertyChanged(nameof(Transfer));
|
||||||
OnPropertyChanged(nameof(TransitioningContentControl));
|
OnPropertyChanged(nameof(TransitioningContentControl));
|
||||||
OnPropertyChanged(nameof(TreeView));
|
OnPropertyChanged(nameof(TreeView));
|
||||||
OnPropertyChanged(nameof(Try2CloseApp));
|
OnPropertyChanged(nameof(Try2CloseApp));
|
||||||
OnPropertyChanged(nameof(Type));
|
OnPropertyChanged(nameof(Type));
|
||||||
OnPropertyChanged(nameof(UploadFile));
|
OnPropertyChanged(nameof(UploadFile));
|
||||||
OnPropertyChanged(nameof(UploadStr));
|
OnPropertyChanged(nameof(UploadStr));
|
||||||
OnPropertyChanged(nameof(Visibility));
|
OnPropertyChanged(nameof(Visibility));
|
||||||
OnPropertyChanged(nameof(Vsix));
|
OnPropertyChanged(nameof(Vsix));
|
||||||
OnPropertyChanged(nameof(Warning));
|
OnPropertyChanged(nameof(Warning));
|
||||||
OnPropertyChanged(nameof(WaterfallPanel));
|
OnPropertyChanged(nameof(WaterfallPanel));
|
||||||
OnPropertyChanged(nameof(Website));
|
OnPropertyChanged(nameof(Website));
|
||||||
OnPropertyChanged(nameof(Window));
|
OnPropertyChanged(nameof(Window));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -2425,4 +2425,4 @@ namespace HandyControlDemo.Properties.Langs
|
|||||||
public static string Window = nameof(Window);
|
public static string Window = nameof(Window);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
@@ -61,7 +61,7 @@ namespace HandyControlDemo.Service
|
|||||||
Index = j,
|
Index = j,
|
||||||
IsSelected = j % 2 == 0,
|
IsSelected = j % 2 == 0,
|
||||||
Name = $"SubName{j}",
|
Name = $"SubName{j}",
|
||||||
Type = (DemoType)j
|
Type = (DemoType) j
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var model = new DemoDataModel
|
var model = new DemoDataModel
|
||||||
@@ -69,7 +69,7 @@ namespace HandyControlDemo.Service
|
|||||||
Index = i,
|
Index = i,
|
||||||
IsSelected = i % 2 == 0,
|
IsSelected = i % 2 == 0,
|
||||||
Name = $"Name{i}",
|
Name = $"Name{i}",
|
||||||
Type = (DemoType)i,
|
Type = (DemoType) i,
|
||||||
DataList = dataList,
|
DataList = dataList,
|
||||||
ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{i % 6 + 1}.png",
|
ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{i % 6 + 1}.png",
|
||||||
Remark = new string(i.ToString()[0], 10)
|
Remark = new string(i.ToString()[0], 10)
|
||||||
@@ -91,7 +91,7 @@ namespace HandyControlDemo.Service
|
|||||||
Index = i,
|
Index = i,
|
||||||
IsSelected = i % 2 == 0,
|
IsSelected = i % 2 == 0,
|
||||||
Name = $"Name{i}",
|
Name = $"Name{i}",
|
||||||
Type = (DemoType)index,
|
Type = (DemoType) index,
|
||||||
ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{index}.png",
|
ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{index}.png",
|
||||||
Remark = new string(i.ToString()[0], 10)
|
Remark = new string(i.ToString()[0], 10)
|
||||||
};
|
};
|
||||||
@@ -129,7 +129,7 @@ namespace HandyControlDemo.Service
|
|||||||
Link = item.html_url
|
Link = item.html_url
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
HandyControl.Controls.MessageBox.Error(e.Message, Lang.Error);
|
HandyControl.Controls.MessageBox.Error(e.Message, Lang.Error);
|
||||||
}
|
}
|
||||||
@@ -396,10 +396,10 @@ namespace HandyControlDemo.Service
|
|||||||
|
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
var name = (string)item[0];
|
var name = (string) item[0];
|
||||||
string targetCtlName = item[1];
|
string targetCtlName = item[1];
|
||||||
string imageName = item[2];
|
string imageName = item[2];
|
||||||
var isNew = !string.IsNullOrEmpty((string)item[3]);
|
var isNew = !string.IsNullOrEmpty((string) item[3]);
|
||||||
|
|
||||||
resultList.Add(new DemoItemModel
|
resultList.Add(new DemoItemModel
|
||||||
{
|
{
|
||||||
@@ -413,4 +413,4 @@ namespace HandyControlDemo.Service
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,4 +18,4 @@ namespace HandyControlDemo.Tools.Converter
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ namespace HandyControlDemo.Tools.Converter
|
|||||||
return strValue;
|
return strValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(parameter is int intValue)
|
else if (parameter is int intValue)
|
||||||
{
|
{
|
||||||
num = intValue;
|
num = intValue;
|
||||||
}
|
}
|
||||||
@@ -42,4 +42,4 @@ namespace HandyControlDemo.Tools.Converter
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,4 +34,4 @@ namespace HandyControlDemo.Tools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31,4 +31,4 @@ namespace HandyControlDemo.Tools
|
|||||||
internal static string GetCopyright() =>
|
internal static string GetCopyright() =>
|
||||||
FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).LegalCopyright;
|
FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).LegalCopyright;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,4 +37,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
set => SetValue(LinkProperty, value);
|
set => SetValue(LinkProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,4 +16,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
set => SetValue(InfoProperty, value);
|
set => SetValue(InfoProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,6 @@
|
|||||||
{
|
{
|
||||||
internal interface IFull
|
internal interface IFull
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,4 +37,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
set => SetValue(LinkProperty, value);
|
set => SetValue(LinkProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ namespace HandyControlDemo.UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
CoverFlowMain.AddRange(new []
|
CoverFlowMain.AddRange(new[]
|
||||||
{
|
{
|
||||||
new Uri(@"pack://application:,,,/Resources/Img/Album/1.jpg"),
|
new Uri(@"pack://application:,,,/Resources/Img/Album/1.jpg"),
|
||||||
new Uri(@"pack://application:,,,/Resources/Img/Album/2.jpg"),
|
new Uri(@"pack://application:,,,/Resources/Img/Album/2.jpg"),
|
||||||
|
|||||||
@@ -7,4 +7,4 @@
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -10,8 +10,8 @@ namespace HandyControlDemo.UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
NumericUpDownCustomVerify.VerifyFunc = str => double.TryParse(str, out var v)
|
NumericUpDownCustomVerify.VerifyFunc = str => double.TryParse(str, out var v)
|
||||||
? v % 2 < 1e-06
|
? v % 2 < 1e-06
|
||||||
? OperationResult.Failed(Properties.Langs.Lang.Error)
|
? OperationResult.Failed(Properties.Langs.Lang.Error)
|
||||||
: OperationResult.Success()
|
: OperationResult.Success()
|
||||||
: OperationResult.Failed(Properties.Langs.Lang.Error);
|
: OperationResult.Failed(Properties.Langs.Lang.Error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,4 @@
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,4 +93,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,4 +130,4 @@ namespace HandyControlDemo.UserControl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ namespace HandyControlDemo.UserControl
|
|||||||
if (tag.Equals(GlobalData.Config.Skin)) return;
|
if (tag.Equals(GlobalData.Config.Skin)) return;
|
||||||
GlobalData.Config.Skin = tag;
|
GlobalData.Config.Skin = tag;
|
||||||
GlobalData.Save();
|
GlobalData.Save();
|
||||||
((App)Application.Current).UpdateSkin(tag);
|
((App) Application.Current).UpdateSkin(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace HandyControlDemo.UserControl
|
|||||||
{
|
{
|
||||||
|
|
||||||
private readonly List<Page> _pageList;
|
private readonly List<Page> _pageList;
|
||||||
|
|
||||||
public FrameDemoCtl()
|
public FrameDemoCtl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|||||||
@@ -174,4 +174,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#if NET40
|
#if NET40
|
||||||
set => Set(nameof(Result), ref _result, value);
|
set => Set(nameof(Result), ref _result, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _result, value);
|
set => Set(ref _result, value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public ComboBoxDemoViewModel(DataService dataService) => DataList = dataService.GetComboBoxDemoDataList();
|
public ComboBoxDemoViewModel(DataService dataService) => DataList = dataService.GetComboBoxDemoDataList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public CoverViewModel(DataService dataService) => DataList = dataService.GetCoverViewDemoDataList();
|
public CoverViewModel(DataService dataService) => DataList = dataService.GetCoverViewDemoDataList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,4 +87,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public RelayCommand<string> ShowWithTokenCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> ShowWithTokenCmd => new Lazy<RelayCommand<string>>(() =>
|
||||||
new RelayCommand<string>(token => Dialog.Show(new TextDialog(), token))).Value;
|
new RelayCommand<string>(token => Dialog.Show(new TextDialog(), token))).Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
public GrowlDemoViewModel()
|
public GrowlDemoViewModel()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GrowlDemoViewModel(string token)
|
public GrowlDemoViewModel(string token)
|
||||||
@@ -113,4 +113,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
Owner = Application.Current.MainWindow
|
Owner = Application.Current.MainWindow
|
||||||
}.Show())).Value;
|
}.Show())).Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,4 +10,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
new RelayCommand(() =>
|
new RelayCommand(() =>
|
||||||
new ImageBrowser(new Uri("pack://application:,,,/Resources/Img/1.jpg")).Show())).Value;
|
new ImageBrowser(new Uri("pack://application:,,,/Resources/Img/1.jpg")).Show())).Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using GalaSoft.MvvmLight.Command;
|
using System;
|
||||||
using System;
|
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using HandyControlDemo.UserControl;
|
using HandyControlDemo.UserControl;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<object> MouseCmd => new Lazy<RelayCommand<object>>(() =>
|
public RelayCommand<object> MouseCmd => new Lazy<RelayCommand<object>>(() =>
|
||||||
new RelayCommand<object>(str=> Growl.Info(str.ToString()))).Value;
|
new RelayCommand<object>(str => Growl.Info(str.ToString()))).Value;
|
||||||
|
|
||||||
public RelayCommand SendNotificationCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand SendNotificationCmd => new Lazy<RelayCommand>(() =>
|
||||||
new RelayCommand(SendNotification)).Value;
|
new RelayCommand(SendNotification)).Value;
|
||||||
@@ -117,4 +117,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
_isCleanup = false;
|
_isCleanup = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,4 +54,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
DataList = _totalDataList.Skip((info.Info - 1) * 10).Take(10).ToList();
|
DataList = _totalDataList.Skip((info.Info - 1) * 10).Take(10).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,4 +15,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
Growl.Info(key);
|
Growl.Info(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using GalaSoft.MvvmLight.Command;
|
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
{
|
{
|
||||||
@@ -18,4 +18,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
private void Select(string header) => Growl.Success(header);
|
private void Select(string header) => Growl.Success(header);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
using HandyControl.Controls;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
|
using HandyControl.Controls;
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControlDemo.UserControl;
|
using HandyControlDemo.UserControl;
|
||||||
using GalaSoft.MvvmLight.Command;
|
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
{
|
{
|
||||||
public class SpriteDemoViewModel
|
public class SpriteDemoViewModel
|
||||||
{
|
{
|
||||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
||||||
new RelayCommand(()=> Sprite.Show(new AppSprite()))).Value;
|
new RelayCommand(() => Sprite.Show(new AppSprite()))).Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,4 +50,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
using HandyControlDemo.Service;
|
using HandyControlDemo.Service;
|
||||||
using GalaSoft.MvvmLight.Command;
|
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
{
|
{
|
||||||
@@ -28,4 +28,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
Growl.Info($"{(args.OriginalSource as TabItem)?.Header} Closed");
|
Growl.Info($"{(args.OriginalSource as TabItem)?.Header} Closed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,4 +47,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
TagName = string.Empty;
|
TagName = string.Empty;
|
||||||
})).Value;
|
})).Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,4 +18,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,4 +23,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,4 +28,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -182,4 +182,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,4 +36,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -102,4 +102,4 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,12 +44,12 @@ namespace HandyControl.Collections
|
|||||||
private int _oldCount;
|
private int _oldCount;
|
||||||
|
|
||||||
public event NotifyCollectionChangedEventHandler CollectionChanged;
|
public event NotifyCollectionChangedEventHandler CollectionChanged;
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
public ManualObservableCollection()
|
public ManualObservableCollection()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable once AssignNullToNotNullAttribute
|
// ReSharper disable once AssignNullToNotNullAttribute
|
||||||
@@ -140,7 +140,7 @@ namespace HandyControl.Collections
|
|||||||
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
|
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!CanNotify || CollectionChanged == null) return;
|
if (!CanNotify || CollectionChanged == null) return;
|
||||||
|
|
||||||
using (BlockReentrancy())
|
using (BlockReentrancy())
|
||||||
{
|
{
|
||||||
// ReSharper disable once PossibleNullReferenceException
|
// ReSharper disable once PossibleNullReferenceException
|
||||||
@@ -162,16 +162,16 @@ namespace HandyControl.Collections
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPropertyChanged(string propertyName) =>
|
private void OnPropertyChanged(string propertyName) =>
|
||||||
OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
|
OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
|
||||||
|
|
||||||
private void OnCollectionChanged(NotifyCollectionChangedAction action, object item, int index) =>
|
private void OnCollectionChanged(NotifyCollectionChangedAction action, object item, int index) =>
|
||||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index));
|
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index));
|
||||||
|
|
||||||
private void OnCollectionChanged(NotifyCollectionChangedAction action, object item, int index, int oldIndex) =>
|
private void OnCollectionChanged(NotifyCollectionChangedAction action, object item, int index, int oldIndex) =>
|
||||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index, oldIndex));
|
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index, oldIndex));
|
||||||
|
|
||||||
private void OnCollectionChanged(NotifyCollectionChangedAction action, object oldItem, object newItem, int index) =>
|
private void OnCollectionChanged(NotifyCollectionChangedAction action, object oldItem, object newItem, int index) =>
|
||||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItem, oldItem, index));
|
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, newItem, oldItem, index));
|
||||||
|
|
||||||
private void OnCollectionReset() =>
|
private void OnCollectionReset() =>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetMouseHoverBackground(DependencyObject element, Brush value) => element.SetValue(MouseHoverBackgroundProperty, value);
|
public static void SetMouseHoverBackground(DependencyObject element, Brush value) => element.SetValue(MouseHoverBackgroundProperty, value);
|
||||||
|
|
||||||
public static Brush GetMouseHoverBackground(DependencyObject element) => (Brush)element.GetValue(MouseHoverBackgroundProperty);
|
public static Brush GetMouseHoverBackground(DependencyObject element) => (Brush) element.GetValue(MouseHoverBackgroundProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty MouseDownBackgroundProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty MouseDownBackgroundProperty = DependencyProperty.RegisterAttached(
|
||||||
"MouseDownBackground", typeof(Brush), typeof(BackgroundSwitchElement), new FrameworkPropertyMetadata(Brushes.Transparent, FrameworkPropertyMetadataOptions.Inherits));
|
"MouseDownBackground", typeof(Brush), typeof(BackgroundSwitchElement), new FrameworkPropertyMetadata(Brushes.Transparent, FrameworkPropertyMetadataOptions.Inherits));
|
||||||
|
|
||||||
public static void SetMouseDownBackground(DependencyObject element, Brush value) => element.SetValue(MouseDownBackgroundProperty, value);
|
public static void SetMouseDownBackground(DependencyObject element, Brush value) => element.SetValue(MouseDownBackgroundProperty, value);
|
||||||
|
|
||||||
public static Brush GetMouseDownBackground(DependencyObject element) => (Brush)element.GetValue(MouseDownBackgroundProperty);
|
public static Brush GetMouseDownBackground(DependencyObject element) => (Brush) element.GetValue(MouseDownBackgroundProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetCornerRadius(DependencyObject element, CornerRadius value) => element.SetValue(CornerRadiusProperty, value);
|
public static void SetCornerRadius(DependencyObject element, CornerRadius value) => element.SetValue(CornerRadiusProperty, value);
|
||||||
|
|
||||||
public static CornerRadius GetCornerRadius(DependencyObject element) => (CornerRadius)element.GetValue(CornerRadiusProperty);
|
public static CornerRadius GetCornerRadius(DependencyObject element) => (CornerRadius) element.GetValue(CornerRadiusProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty CircularProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty CircularProperty = DependencyProperty.RegisterAttached(
|
||||||
"Circular", typeof(bool), typeof(BorderElement), new PropertyMetadata(ValueBoxes.FalseBox, OnCircularChanged));
|
"Circular", typeof(bool), typeof(BorderElement), new PropertyMetadata(ValueBoxes.FalseBox, OnCircularChanged));
|
||||||
@@ -22,13 +22,13 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is Border border)
|
if (d is Border border)
|
||||||
{
|
{
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
var binding = new MultiBinding
|
var binding = new MultiBinding
|
||||||
{
|
{
|
||||||
Converter = new BorderCircularConverter()
|
Converter = new BorderCircularConverter()
|
||||||
};
|
};
|
||||||
binding.Bindings.Add(new Binding(FrameworkElement.ActualWidthProperty.Name) {Source = border});
|
binding.Bindings.Add(new Binding(FrameworkElement.ActualWidthProperty.Name) { Source = border });
|
||||||
binding.Bindings.Add(new Binding(FrameworkElement.ActualHeightProperty.Name) { Source = border });
|
binding.Bindings.Add(new Binding(FrameworkElement.ActualHeightProperty.Name) { Source = border });
|
||||||
border.SetBinding(Border.CornerRadiusProperty, binding);
|
border.SetBinding(Border.CornerRadiusProperty, binding);
|
||||||
}
|
}
|
||||||
@@ -47,4 +47,4 @@ namespace HandyControl.Controls
|
|||||||
public static bool GetCircular(DependencyObject element)
|
public static bool GetCircular(DependencyObject element)
|
||||||
=> (bool) element.GetValue(CircularProperty);
|
=> (bool) element.GetValue(CircularProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
@@ -14,8 +14,8 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnApplyDefaultStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnApplyDefaultStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var grid = (DataGrid)d;
|
var grid = (DataGrid) d;
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
if (grid.AutoGenerateColumns)
|
if (grid.AutoGenerateColumns)
|
||||||
{
|
{
|
||||||
@@ -35,7 +35,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void Grid_AutoGeneratedColumns(object sender, System.EventArgs e)
|
private static void Grid_AutoGeneratedColumns(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
var grid = (DataGrid)sender;
|
var grid = (DataGrid) sender;
|
||||||
UpdateTextColumnStyles(grid);
|
UpdateTextColumnStyles(grid);
|
||||||
UpdateComboBoxColumnStyles(grid);
|
UpdateComboBoxColumnStyles(grid);
|
||||||
UpdateCheckBoxColumnStyles(grid);
|
UpdateCheckBoxColumnStyles(grid);
|
||||||
@@ -52,7 +52,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnTextColumnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnTextColumnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var grid = (DataGrid)d;
|
var grid = (DataGrid) d;
|
||||||
if (e.OldValue == null && e.NewValue != null)
|
if (e.OldValue == null && e.NewValue != null)
|
||||||
{
|
{
|
||||||
UpdateTextColumnStyles(grid);
|
UpdateTextColumnStyles(grid);
|
||||||
@@ -61,7 +61,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetTextColumnStyle(DependencyObject element, Style value) => element.SetValue(TextColumnStyleProperty, value);
|
public static void SetTextColumnStyle(DependencyObject element, Style value) => element.SetValue(TextColumnStyleProperty, value);
|
||||||
|
|
||||||
public static Style GetTextColumnStyle(DependencyObject element) => (Style)element.GetValue(TextColumnStyleProperty);
|
public static Style GetTextColumnStyle(DependencyObject element) => (Style) element.GetValue(TextColumnStyleProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty EditingTextColumnStyleProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty EditingTextColumnStyleProperty = DependencyProperty.RegisterAttached(
|
||||||
"EditingTextColumnStyle", typeof(Style), typeof(DataGridAttach), new PropertyMetadata(default(Style), OnTextColumnStyleChanged));
|
"EditingTextColumnStyle", typeof(Style), typeof(DataGridAttach), new PropertyMetadata(default(Style), OnTextColumnStyleChanged));
|
||||||
@@ -119,7 +119,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnComboBoxColumnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnComboBoxColumnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var grid = (DataGrid)d;
|
var grid = (DataGrid) d;
|
||||||
if (e.OldValue == null && e.NewValue != null)
|
if (e.OldValue == null && e.NewValue != null)
|
||||||
{
|
{
|
||||||
UpdateComboBoxColumnStyles(grid);
|
UpdateComboBoxColumnStyles(grid);
|
||||||
@@ -186,7 +186,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnCheckBoxColumnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnCheckBoxColumnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var grid = (DataGrid)d;
|
var grid = (DataGrid) d;
|
||||||
if (e.OldValue == null && e.NewValue != null)
|
if (e.OldValue == null && e.NewValue != null)
|
||||||
{
|
{
|
||||||
UpdateCheckBoxColumnStyles(grid);
|
UpdateCheckBoxColumnStyles(grid);
|
||||||
@@ -195,7 +195,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetCheckBoxColumnStyle(DependencyObject element, Style value) => element.SetValue(CheckBoxColumnStyleProperty, value);
|
public static void SetCheckBoxColumnStyle(DependencyObject element, Style value) => element.SetValue(CheckBoxColumnStyleProperty, value);
|
||||||
|
|
||||||
public static Style GetCheckBoxColumnStyle(DependencyObject element) => (Style)element.GetValue(CheckBoxColumnStyleProperty);
|
public static Style GetCheckBoxColumnStyle(DependencyObject element) => (Style) element.GetValue(CheckBoxColumnStyleProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty EditingCheckBoxColumnStyleProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty EditingCheckBoxColumnStyleProperty = DependencyProperty.RegisterAttached(
|
||||||
"EditingCheckBoxColumnStyle", typeof(Style), typeof(DataGridAttach), new PropertyMetadata(default(Style), OnCheckBoxColumnStyleChanged));
|
"EditingCheckBoxColumnStyle", typeof(Style), typeof(DataGridAttach), new PropertyMetadata(default(Style), OnCheckBoxColumnStyleChanged));
|
||||||
@@ -252,14 +252,14 @@ namespace HandyControl.Controls
|
|||||||
typeof(bool), typeof(DataGridAttach),
|
typeof(bool), typeof(DataGridAttach),
|
||||||
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits, OnShowRowNumberChanged));
|
new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits, OnShowRowNumberChanged));
|
||||||
|
|
||||||
public static bool GetShowRowNumber(DependencyObject target) => (bool)target.GetValue(ShowRowNumberProperty);
|
public static bool GetShowRowNumber(DependencyObject target) => (bool) target.GetValue(ShowRowNumberProperty);
|
||||||
|
|
||||||
public static void SetShowRowNumber(DependencyObject target, bool value) => target.SetValue(ShowRowNumberProperty, ValueBoxes.BooleanBox(value));
|
public static void SetShowRowNumber(DependencyObject target, bool value) => target.SetValue(ShowRowNumberProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
private static void OnShowRowNumberChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
|
private static void OnShowRowNumberChanged(DependencyObject target, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(target is DataGrid dataGrid)) return;
|
if (!(target is DataGrid dataGrid)) return;
|
||||||
var show = (bool)e.NewValue;
|
var show = (bool) e.NewValue;
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
{
|
{
|
||||||
@@ -287,7 +287,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
for (var i = 0; i < itemsCount; i++)
|
for (var i = 0; i < itemsCount; i++)
|
||||||
{
|
{
|
||||||
var row = (DataGridRow)generator.ContainerFromIndex(i);
|
var row = (DataGridRow) generator.ContainerFromIndex(i);
|
||||||
if (row != null)
|
if (row != null)
|
||||||
{
|
{
|
||||||
row.Header = (i + 1).ToString();
|
row.Header = (i + 1).ToString();
|
||||||
@@ -298,7 +298,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
for (var i = 0; i < itemsCount; i++)
|
for (var i = 0; i < itemsCount; i++)
|
||||||
{
|
{
|
||||||
var row = (DataGridRow)generator.ContainerFromIndex(i);
|
var row = (DataGridRow) generator.ContainerFromIndex(i);
|
||||||
if (row != null)
|
if (row != null)
|
||||||
{
|
{
|
||||||
row.Header = null;
|
row.Header = null;
|
||||||
@@ -316,7 +316,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is DataGrid dataGrid)
|
if (d is DataGrid dataGrid)
|
||||||
{
|
{
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
dataGrid.PreviewMouseDown += DataGrid_PreviewMouseDown;
|
dataGrid.PreviewMouseDown += DataGrid_PreviewMouseDown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,4 @@ namespace HandyControl.Controls
|
|||||||
SetShowEdgeContent(d, !(GetLeftContent(d) == null && GetTopContent(d) == null &&
|
SetShowEdgeContent(d, !(GetLeftContent(d) == null && GetTopContent(d) == null &&
|
||||||
GetRightContent(d) == null && GetBottomContent(d) == null));
|
GetRightContent(d) == null && GetBottomContent(d) == null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace HandyControl.Controls
|
|||||||
public static void SetGeometry(DependencyObject element, Geometry value)
|
public static void SetGeometry(DependencyObject element, Geometry value)
|
||||||
=> element.SetValue(GeometryProperty, value);
|
=> element.SetValue(GeometryProperty, value);
|
||||||
|
|
||||||
public static Geometry GetGeometry(DependencyObject element)
|
public static Geometry GetGeometry(DependencyObject element)
|
||||||
=> (Geometry) element.GetValue(GeometryProperty);
|
=> (Geometry) element.GetValue(GeometryProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty WidthProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty WidthProperty = DependencyProperty.RegisterAttached(
|
||||||
@@ -32,4 +32,4 @@ namespace HandyControl.Controls
|
|||||||
public static double GetHeight(DependencyObject element)
|
public static double GetHeight(DependencyObject element)
|
||||||
=> (double) element.GetValue(HeightProperty);
|
=> (double) element.GetValue(HeightProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static Geometry GetGeometrySelected(DependencyObject element)
|
public static Geometry GetGeometrySelected(DependencyObject element)
|
||||||
{
|
{
|
||||||
return (Geometry)element.GetValue(GeometrySelectedProperty);
|
return (Geometry) element.GetValue(GeometrySelectedProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetPlaceholder(DependencyObject element, string value) => element.SetValue(PlaceholderProperty, value);
|
public static void SetPlaceholder(DependencyObject element, string value) => element.SetValue(PlaceholderProperty, value);
|
||||||
|
|
||||||
public static string GetPlaceholder(DependencyObject element) => (string)element.GetValue(PlaceholderProperty);
|
public static string GetPlaceholder(DependencyObject element) => (string) element.GetValue(PlaceholderProperty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否必填
|
/// 是否必填
|
||||||
@@ -23,7 +23,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetNecessary(DependencyObject element, bool value) => element.SetValue(NecessaryProperty, ValueBoxes.BooleanBox(value));
|
public static void SetNecessary(DependencyObject element, bool value) => element.SetValue(NecessaryProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetNecessary(DependencyObject element) => (bool)element.GetValue(NecessaryProperty);
|
public static bool GetNecessary(DependencyObject element) => (bool) element.GetValue(NecessaryProperty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标记
|
/// 标记
|
||||||
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetSymbol(DependencyObject element, string value) => element.SetValue(SymbolProperty, value);
|
public static void SetSymbol(DependencyObject element, string value) => element.SetValue(SymbolProperty, value);
|
||||||
|
|
||||||
public static string GetSymbol(DependencyObject element) => (string)element.GetValue(SymbolProperty);
|
public static string GetSymbol(DependencyObject element) => (string) element.GetValue(SymbolProperty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 内容高度
|
/// 内容高度
|
||||||
@@ -43,7 +43,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetContentHeight(DependencyObject element, double value) => element.SetValue(ContentHeightProperty, value);
|
public static void SetContentHeight(DependencyObject element, double value) => element.SetValue(ContentHeightProperty, value);
|
||||||
|
|
||||||
public static double GetContentHeight(DependencyObject element) => (double)element.GetValue(ContentHeightProperty);
|
public static double GetContentHeight(DependencyObject element) => (double) element.GetValue(ContentHeightProperty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最小内容高度
|
/// 最小内容高度
|
||||||
@@ -81,4 +81,4 @@ namespace HandyControl.Controls
|
|||||||
public static string GetRegexPattern(DependencyObject element)
|
public static string GetRegexPattern(DependencyObject element)
|
||||||
=> (string) element.GetValue(RegexPatternProperty);
|
=> (string) element.GetValue(RegexPatternProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void MenuItem_Loaded(object sender, RoutedEventArgs e)
|
private static void MenuItem_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var menuItem = (FrameworkElement)sender;
|
var menuItem = (FrameworkElement) sender;
|
||||||
menuItem.Unloaded += MenuItem_Unloaded;
|
menuItem.Unloaded += MenuItem_Unloaded;
|
||||||
var topLine = GetTopLine(menuItem);
|
var topLine = GetTopLine(menuItem);
|
||||||
var popup = GetPopup(topLine);
|
var popup = GetPopup(topLine);
|
||||||
@@ -40,7 +40,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void MenuItem_Unloaded(object sender, RoutedEventArgs e)
|
private static void MenuItem_Unloaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var menuItem = (FrameworkElement)sender;
|
var menuItem = (FrameworkElement) sender;
|
||||||
menuItem.Unloaded -= MenuItem_Unloaded;
|
menuItem.Unloaded -= MenuItem_Unloaded;
|
||||||
var topLine = GetTopLine(menuItem);
|
var topLine = GetTopLine(menuItem);
|
||||||
var popup = GetPopup(topLine);
|
var popup = GetPopup(topLine);
|
||||||
@@ -69,7 +69,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
if (positionLeftTop.X < 0)
|
if (positionLeftTop.X < 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
topLine.Margin = new Thickness(positionLeftTop.X - panel.Margin.Left, 0, 0, 0);
|
topLine.Margin = new Thickness(positionLeftTop.X - panel.Margin.Left, 0, 0, 0);
|
||||||
}
|
}
|
||||||
else if (positionLeftTop.X + panel.ActualWidth > workAreaRect.Right)
|
else if (positionLeftTop.X + panel.ActualWidth > workAreaRect.Right)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace HandyControl.Controls
|
|||||||
private static void OnFluidMoveBehaviorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnFluidMoveBehaviorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (d is Panel panel)
|
if (d is Panel panel)
|
||||||
{
|
{
|
||||||
var collection = Interaction.GetBehaviors(panel);
|
var collection = Interaction.GetBehaviors(panel);
|
||||||
var oldBehavior = GetTempFluidMoveBehavior(panel);
|
var oldBehavior = GetTempFluidMoveBehavior(panel);
|
||||||
collection.ItemRemoved(oldBehavior);
|
collection.ItemRemoved(oldBehavior);
|
||||||
@@ -41,4 +41,4 @@ namespace HandyControl.Controls
|
|||||||
private static FluidMoveBehavior GetTempFluidMoveBehavior(DependencyObject element)
|
private static FluidMoveBehavior GetTempFluidMoveBehavior(DependencyObject element)
|
||||||
=> (FluidMoveBehavior) element.GetValue(TempFluidMoveBehaviorProperty);
|
=> (FluidMoveBehavior) element.GetValue(TempFluidMoveBehaviorProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetPasswordLength(DependencyObject element, int value) => element.SetValue(PasswordLengthProperty, value);
|
public static void SetPasswordLength(DependencyObject element, int value) => element.SetValue(PasswordLengthProperty, value);
|
||||||
|
|
||||||
public static int GetPasswordLength(DependencyObject element) => (int)element.GetValue(PasswordLengthProperty);
|
public static int GetPasswordLength(DependencyObject element) => (int) element.GetValue(PasswordLengthProperty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否监测
|
/// 是否监测
|
||||||
@@ -41,7 +41,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetIsMonitoring(DependencyObject element, bool value) => element.SetValue(IsMonitoringProperty, ValueBoxes.BooleanBox(value));
|
public static void SetIsMonitoring(DependencyObject element, bool value) => element.SetValue(IsMonitoringProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetIsMonitoring(DependencyObject element) => (bool)element.GetValue(IsMonitoringProperty);
|
public static bool GetIsMonitoring(DependencyObject element) => (bool) element.GetValue(IsMonitoringProperty);
|
||||||
|
|
||||||
private static void PasswordChanged(object sender, RoutedEventArgs e)
|
private static void PasswordChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -51,4 +51,4 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is Rectangle rectangle)
|
if (d is Rectangle rectangle)
|
||||||
{
|
{
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
var binding = new MultiBinding
|
var binding = new MultiBinding
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static bool GetHideUncheckedElement(DependencyObject element) => (bool) element.GetValue(HideUncheckedElementProperty);
|
public static bool GetHideUncheckedElement(DependencyObject element) => (bool) element.GetValue(HideUncheckedElementProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is TextBlock ctl)
|
if (d is TextBlock ctl)
|
||||||
{
|
{
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
ctl.TextTrimming = TextTrimming.WordEllipsis;
|
ctl.TextTrimming = TextTrimming.WordEllipsis;
|
||||||
UpdateTooltip(ctl);
|
UpdateTooltip(ctl);
|
||||||
@@ -50,4 +50,4 @@ namespace HandyControl.Controls
|
|||||||
textBlock.RenderSize.Width > width || textBlock.ActualWidth < width ? textBlock.Text : null);
|
textBlock.RenderSize.Width > width || textBlock.ActualWidth < width ? textBlock.Text : null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,4 +28,4 @@ namespace HandyControl.Controls
|
|||||||
public static string GetStringFormat(DependencyObject element)
|
public static string GetStringFormat(DependencyObject element)
|
||||||
=> (string) element.GetValue(StringFormatProperty);
|
=> (string) element.GetValue(StringFormatProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static void SetTitleWidth(DependencyObject element, GridLength value) => element.SetValue(TitleWidthProperty, value);
|
public static void SetTitleWidth(DependencyObject element, GridLength value) => element.SetValue(TitleWidthProperty, value);
|
||||||
|
|
||||||
public static GridLength GetTitleWidth(DependencyObject element) => (GridLength)element.GetValue(TitleWidthProperty);
|
public static GridLength GetTitleWidth(DependencyObject element) => (GridLength) element.GetValue(TitleWidthProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty HorizontalAlignmentProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty HorizontalAlignmentProperty = DependencyProperty.RegisterAttached(
|
||||||
"HorizontalAlignment", typeof(HorizontalAlignment), typeof(TitleElement), new FrameworkPropertyMetadata(default(HorizontalAlignment), FrameworkPropertyMetadataOptions.Inherits));
|
"HorizontalAlignment", typeof(HorizontalAlignment), typeof(TitleElement), new FrameworkPropertyMetadata(default(HorizontalAlignment), FrameworkPropertyMetadataOptions.Inherits));
|
||||||
@@ -76,4 +76,4 @@ namespace HandyControl.Controls
|
|||||||
public static VerticalAlignment GetVerticalAlignment(DependencyObject element)
|
public static VerticalAlignment GetVerticalAlignment(DependencyObject element)
|
||||||
=> (VerticalAlignment) element.GetValue(VerticalAlignmentProperty);
|
=> (VerticalAlignment) element.GetValue(VerticalAlignmentProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,4 +50,4 @@ namespace HandyControl.Controls
|
|||||||
public static string GetText(DependencyObject element)
|
public static string GetText(DependencyObject element)
|
||||||
=> (string) element.GetValue(TextProperty);
|
=> (string) element.GetValue(TextProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is UIElement ctl)
|
if (d is UIElement ctl)
|
||||||
{
|
{
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
ctl.MouseLeftButtonDown += DragElement_MouseLeftButtonDown;
|
ctl.MouseLeftButtonDown += DragElement_MouseLeftButtonDown;
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is System.Windows.Window window)
|
if (d is System.Windows.Window window)
|
||||||
{
|
{
|
||||||
if ((bool)e.NewValue)
|
if ((bool) e.NewValue)
|
||||||
{
|
{
|
||||||
window.PreviewKeyDown += Window_PreviewKeyDown;
|
window.PreviewKeyDown += Window_PreviewKeyDown;
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ namespace HandyControl.Controls
|
|||||||
=> element.SetValue(ShowInTaskManagerProperty, ValueBoxes.BooleanBox(value));
|
=> element.SetValue(ShowInTaskManagerProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
public static bool GetShowInTaskManager(DependencyObject element)
|
public static bool GetShowInTaskManager(DependencyObject element)
|
||||||
=> (bool)element.GetValue(ShowInTaskManagerProperty);
|
=> (bool) element.GetValue(ShowInTaskManagerProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty HideWhenClosingProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty HideWhenClosingProperty = DependencyProperty.RegisterAttached(
|
||||||
"HideWhenClosing", typeof(bool), typeof(WindowAttach), new PropertyMetadata(ValueBoxes.FalseBox, OnHideWhenClosingChanged));
|
"HideWhenClosing", typeof(bool), typeof(WindowAttach), new PropertyMetadata(ValueBoxes.FalseBox, OnHideWhenClosingChanged));
|
||||||
@@ -119,7 +119,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (d is System.Windows.Window window)
|
if (d is System.Windows.Window window)
|
||||||
{
|
{
|
||||||
var v = (bool)e.NewValue;
|
var v = (bool) e.NewValue;
|
||||||
if (v)
|
if (v)
|
||||||
{
|
{
|
||||||
window.Closing += Window_Closing;
|
window.Closing += Window_Closing;
|
||||||
@@ -146,4 +146,4 @@ namespace HandyControl.Controls
|
|||||||
public static bool GetHideWhenClosing(DependencyObject element)
|
public static bool GetHideWhenClosing(DependencyObject element)
|
||||||
=> (bool) element.GetValue(HideWhenClosingProperty);
|
=> (bool) element.GetValue(HideWhenClosingProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,9 +15,9 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnTargetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnTargetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var ctl = (AdornerElement)d;
|
var ctl = (AdornerElement) d;
|
||||||
ctl.OnTargetChanged(ctl.ElementTarget, false);
|
ctl.OnTargetChanged(ctl.ElementTarget, false);
|
||||||
ctl.OnTargetChanged((FrameworkElement)e.NewValue, true);
|
ctl.OnTargetChanged((FrameworkElement) e.NewValue, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Bindable(true), Category("Layout")]
|
[Bindable(true), Category("Layout")]
|
||||||
@@ -34,7 +34,7 @@ namespace HandyControl.Controls
|
|||||||
private static void OnInstanceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnInstanceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!(d is FrameworkElement target)) return;
|
if (!(d is FrameworkElement target)) return;
|
||||||
var element = (AdornerElement)e.NewValue;
|
var element = (AdornerElement) e.NewValue;
|
||||||
element.OnInstanceChanged(target);
|
element.OnInstanceChanged(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(HeaderTemplateProperty, value);
|
set => SetValue(HeaderTemplateProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,4 +13,4 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(HeaderProperty, value);
|
set => SetValue(HeaderProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,4 +4,4 @@
|
|||||||
{
|
{
|
||||||
object GetGravatar(string id);
|
object GetGravatar(string id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,4 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
bool IsSelected { get; set; }
|
bool IsSelected { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,4 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
bool CanDispose { get; }
|
bool CanDispose { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,4 +38,4 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(ItemMarginProperty, value);
|
set => SetValue(ItemMarginProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public bool IsSelected
|
public bool IsSelected
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(IsSelectedProperty);
|
get => (bool) GetValue(IsSelectedProperty);
|
||||||
set => SetValue(IsSelectedProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(IsSelectedProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,4 +108,4 @@ namespace HandyControl.Controls
|
|||||||
remove => RemoveHandler(DeselectedEvent, value);
|
remove => RemoveHandler(DeselectedEvent, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnItemTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnItemTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
=> (d as SimpleItemsControl)?.OnItemTemplateChanged(e);
|
=> (d as SimpleItemsControl)?.OnItemTemplateChanged(e);
|
||||||
|
|
||||||
protected virtual void OnItemTemplateChanged(DependencyPropertyChangedEventArgs e) => Refresh();
|
protected virtual void OnItemTemplateChanged(DependencyPropertyChangedEventArgs e) => Refresh();
|
||||||
@@ -164,4 +164,4 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ namespace HandyControl.Controls
|
|||||||
=> element.SetValue(ToYProperty, value);
|
=> element.SetValue(ToYProperty, value);
|
||||||
|
|
||||||
public static double GetToY(DependencyObject element)
|
public static double GetToY(DependencyObject element)
|
||||||
=> (double)element.GetValue(ToYProperty);
|
=> (double) element.GetValue(ToYProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty DurationProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty DurationProperty = DependencyProperty.RegisterAttached(
|
||||||
"Duration", typeof(Duration), typeof(FloatingBlock), new PropertyMetadata(new Duration(TimeSpan.FromSeconds(2))));
|
"Duration", typeof(Duration), typeof(FloatingBlock), new PropertyMetadata(new Duration(TimeSpan.FromSeconds(2))));
|
||||||
@@ -57,7 +57,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public static double GetVerticalOffset(DependencyObject element)
|
public static double GetVerticalOffset(DependencyObject element)
|
||||||
=> (double) element.GetValue(VerticalOffsetProperty);
|
=> (double) element.GetValue(VerticalOffsetProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty ContentTemplateProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty ContentTemplateProperty = DependencyProperty.RegisterAttached(
|
||||||
"ContentTemplate", typeof(DataTemplate), typeof(FloatingBlock), new PropertyMetadata(default(DataTemplate), OnDataChanged));
|
"ContentTemplate", typeof(DataTemplate), typeof(FloatingBlock), new PropertyMetadata(default(DataTemplate), OnDataChanged));
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public DataTemplate ContentTemplate
|
public DataTemplate ContentTemplate
|
||||||
{
|
{
|
||||||
get => (DataTemplate)GetValue(ContentTemplateProperty);
|
get => (DataTemplate) GetValue(ContentTemplateProperty);
|
||||||
set => SetValue(ContentTemplateProperty, value);
|
set => SetValue(ContentTemplateProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ namespace HandyControl.Controls
|
|||||||
=> element.SetValue(ReadyToFloatProperty, ValueBoxes.BooleanBox(value));
|
=> element.SetValue(ReadyToFloatProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
private static bool GetReadyToFloat(DependencyObject element)
|
private static bool GetReadyToFloat(DependencyObject element)
|
||||||
=> (bool)element.GetValue(ReadyToFloatProperty);
|
=> (bool) element.GetValue(ReadyToFloatProperty);
|
||||||
|
|
||||||
public static readonly DependencyProperty ContentProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty ContentProperty = DependencyProperty.RegisterAttached(
|
||||||
"Content", typeof(object), typeof(FloatingBlock), new PropertyMetadata(default, OnDataChanged));
|
"Content", typeof(object), typeof(FloatingBlock), new PropertyMetadata(default, OnDataChanged));
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public bool Runaway
|
public bool Runaway
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(RunawayProperty);
|
get => (bool) GetValue(RunawayProperty);
|
||||||
set => SetValue(RunawayProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(RunawayProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public bool AutoRun
|
public bool AutoRun
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(AutoRunProperty);
|
get => (bool) GetValue(AutoRunProperty);
|
||||||
set => SetValue(AutoRunProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(AutoRunProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public Orientation Orientation
|
public Orientation Orientation
|
||||||
{
|
{
|
||||||
get => (Orientation)GetValue(OrientationProperty);
|
get => (Orientation) GetValue(OrientationProperty);
|
||||||
set => SetValue(OrientationProperty, value);
|
set => SetValue(OrientationProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public Duration Duration
|
public Duration Duration
|
||||||
{
|
{
|
||||||
get => (Duration)GetValue(DurationProperty);
|
get => (Duration) GetValue(DurationProperty);
|
||||||
set => SetValue(DurationProperty, value);
|
set => SetValue(DurationProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,15 +84,15 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public double Speed
|
public double Speed
|
||||||
{
|
{
|
||||||
get => (double)GetValue(SpeedProperty);
|
get => (double) GetValue(SpeedProperty);
|
||||||
set => SetValue(SpeedProperty, value);
|
set => SetValue(SpeedProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty IsRunningProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty IsRunningProperty = DependencyProperty.Register(
|
||||||
"IsRunning", typeof(bool), typeof(RunningBlock), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
|
"IsRunning", typeof(bool), typeof(RunningBlock), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
|
||||||
{
|
{
|
||||||
var ctl = (RunningBlock)o;
|
var ctl = (RunningBlock) o;
|
||||||
var v = (bool)args.NewValue;
|
var v = (bool) args.NewValue;
|
||||||
if (v)
|
if (v)
|
||||||
{
|
{
|
||||||
ctl._storyboard?.Resume();
|
ctl._storyboard?.Resume();
|
||||||
@@ -105,7 +105,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public bool IsRunning
|
public bool IsRunning
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(IsRunningProperty);
|
get => (bool) GetValue(IsRunningProperty);
|
||||||
set => SetValue(IsRunningProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(IsRunningProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public bool AutoReverse
|
public bool AutoReverse
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(AutoReverseProperty);
|
get => (bool) GetValue(AutoReverseProperty);
|
||||||
set => SetValue(AutoReverseProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(AutoReverseProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,4 +190,4 @@ namespace HandyControl.Controls
|
|||||||
_storyboard.Begin();
|
_storyboard.Begin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,4 +62,4 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static Size ConvertThickness2Size(Thickness th) => new Size(th.Left + th.Right, th.Top + th.Bottom);
|
private static Size ConvertThickness2Size(Thickness th) => new Size(th.Left + th.Right, th.Top + th.Bottom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ namespace HandyControl.Controls
|
|||||||
// Because Nullable<bool> unboxing is very slow (uses reflection) first we cast to bool
|
// Because Nullable<bool> unboxing is very slow (uses reflection) first we cast to bool
|
||||||
var value = GetValue(IsCheckedProperty);
|
var value = GetValue(IsCheckedProperty);
|
||||||
// ReSharper disable once RedundantExplicitNullableCreation
|
// ReSharper disable once RedundantExplicitNullableCreation
|
||||||
return value == null ? new bool?() : new bool?((bool)value);
|
return value == null ? new bool?() : new bool?((bool) value);
|
||||||
}
|
}
|
||||||
set => SetValue(IsCheckedProperty, value.HasValue ? ValueBoxes.BooleanBox(value.Value) : null);
|
set => SetValue(IsCheckedProperty, value.HasValue ? ValueBoxes.BooleanBox(value.Value) : null);
|
||||||
}
|
}
|
||||||
@@ -56,4 +56,4 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(IndeterminateContentProperty, value);
|
set => SetValue(IndeterminateContentProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public Orientation Orientation
|
public Orientation Orientation
|
||||||
{
|
{
|
||||||
get => (Orientation)GetValue(OrientationProperty);
|
get => (Orientation) GetValue(OrientationProperty);
|
||||||
set => SetValue(OrientationProperty, value);
|
set => SetValue(OrientationProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ namespace HandyControl.Controls
|
|||||||
var count = Items.Count;
|
var count = Items.Count;
|
||||||
for (var i = 0; i < count; i++)
|
for (var i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
var item = (ButtonBase)Items[i];
|
var item = (ButtonBase) Items[i];
|
||||||
item.Style = ItemContainerStyleSelector?.SelectStyle(item, this);
|
item.Style = ItemContainerStyleSelector?.SelectStyle(item, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,4 +28,4 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,4 +24,4 @@ namespace HandyControl.Controls
|
|||||||
set => SetValue(ProgressProperty, value);
|
set => SetValue(ProgressProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,8 +82,8 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty AutoRunProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty AutoRunProperty = DependencyProperty.Register(
|
||||||
"AutoRun", typeof(bool), typeof(Carousel), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
|
"AutoRun", typeof(bool), typeof(Carousel), new PropertyMetadata(ValueBoxes.FalseBox, (o, args) =>
|
||||||
{
|
{
|
||||||
var ctl = (Carousel)o;
|
var ctl = (Carousel) o;
|
||||||
ctl.TimerSwitch((bool)args.NewValue);
|
ctl.TimerSwitch((bool) args.NewValue);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
public static readonly DependencyProperty IntervalProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty IntervalProperty = DependencyProperty.Register(
|
||||||
@@ -94,7 +94,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public double ExtendWidth
|
public double ExtendWidth
|
||||||
{
|
{
|
||||||
get => (double)GetValue(ExtendWidthProperty);
|
get => (double) GetValue(ExtendWidthProperty);
|
||||||
set => SetValue(ExtendWidthProperty, value);
|
set => SetValue(ExtendWidthProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public bool IsCenter
|
public bool IsCenter
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(IsCenterProperty);
|
get => (bool) GetValue(IsCenterProperty);
|
||||||
set => SetValue(IsCenterProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(IsCenterProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AutoRun
|
public bool AutoRun
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(AutoRunProperty);
|
get => (bool) GetValue(AutoRunProperty);
|
||||||
set => SetValue(AutoRunProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(AutoRunProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public TimeSpan Interval
|
public TimeSpan Interval
|
||||||
{
|
{
|
||||||
get => (TimeSpan)GetValue(IntervalProperty);
|
get => (TimeSpan) GetValue(IntervalProperty);
|
||||||
set => SetValue(IntervalProperty, value);
|
set => SetValue(IntervalProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,7 +278,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var ctl = (FrameworkElement)ItemsHost.Children[PageIndex];
|
var ctl = (FrameworkElement) ItemsHost.Children[PageIndex];
|
||||||
var ctlWidth = ctl.DesiredSize.Width;
|
var ctlWidth = ctl.DesiredSize.Width;
|
||||||
ItemsHost.BeginAnimation(MarginProperty,
|
ItemsHost.BeginAnimation(MarginProperty,
|
||||||
AnimationHelper.CreateAnimation(
|
AnimationHelper.CreateAnimation(
|
||||||
@@ -297,7 +297,7 @@ namespace HandyControl.Controls
|
|||||||
if (!CheckNull()) return;
|
if (!CheckNull()) return;
|
||||||
|
|
||||||
_selectedButton = e.OriginalSource as RadioButton;
|
_selectedButton = e.OriginalSource as RadioButton;
|
||||||
|
|
||||||
var index = _panelPage.Children.IndexOf(_selectedButton);
|
var index = _panelPage.Children.IndexOf(_selectedButton);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
@@ -453,4 +453,4 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,9 +98,9 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
var desk = InteropMethods.GetDesktopWindow();
|
var desk = InteropMethods.GetDesktopWindow();
|
||||||
var dc = InteropMethods.GetWindowDC(desk);
|
var dc = InteropMethods.GetWindowDC(desk);
|
||||||
var a = (int)InteropMethods.GetPixel(dc, x, y);
|
var a = (int) InteropMethods.GetPixel(dc, x, y);
|
||||||
InteropMethods.ReleaseDC(desk, dc);
|
InteropMethods.ReleaseDC(desk, dc);
|
||||||
return Color.FromArgb(255, (byte) ((a >> 0) & 0xff), (byte) ((a >> 8) & 0xff), (byte) ((a >> 16) & 0xff));
|
return Color.FromArgb(255, (byte) ((a >> 0) & 0xff), (byte) ((a >> 8) & 0xff), (byte) ((a >> 16) & 0xff));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal int ChannelA
|
internal int ChannelA
|
||||||
{
|
{
|
||||||
get => (int)GetValue(ChannelAProperty);
|
get => (int) GetValue(ChannelAProperty);
|
||||||
set => SetValue(ChannelAProperty, value);
|
set => SetValue(ChannelAProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal int ChannelR
|
internal int ChannelR
|
||||||
{
|
{
|
||||||
get => (int)GetValue(ChannelRProperty);
|
get => (int) GetValue(ChannelRProperty);
|
||||||
set => SetValue(ChannelRProperty, value);
|
set => SetValue(ChannelRProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal int ChannelG
|
internal int ChannelG
|
||||||
{
|
{
|
||||||
get => (int)GetValue(ChannelGProperty);
|
get => (int) GetValue(ChannelGProperty);
|
||||||
set => SetValue(ChannelGProperty, value);
|
set => SetValue(ChannelGProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal int ChannelB
|
internal int ChannelB
|
||||||
{
|
{
|
||||||
get => (int)GetValue(ChannelBProperty);
|
get => (int) GetValue(ChannelBProperty);
|
||||||
set => SetValue(ChannelBProperty, value);
|
set => SetValue(ChannelBProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,8 +254,8 @@ namespace HandyControl.Controls
|
|||||||
"SelectedBrush", typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White,
|
"SelectedBrush", typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White,
|
||||||
(o, args) =>
|
(o, args) =>
|
||||||
{
|
{
|
||||||
var ctl = (ColorPicker)o;
|
var ctl = (ColorPicker) o;
|
||||||
var v = (SolidColorBrush)args.NewValue;
|
var v = (SolidColorBrush) args.NewValue;
|
||||||
|
|
||||||
if (ctl.IsNeedUpdateInfo)
|
if (ctl.IsNeedUpdateInfo)
|
||||||
{
|
{
|
||||||
@@ -275,7 +275,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public SolidColorBrush SelectedBrush
|
public SolidColorBrush SelectedBrush
|
||||||
{
|
{
|
||||||
get => (SolidColorBrush)GetValue(SelectedBrushProperty);
|
get => (SolidColorBrush) GetValue(SelectedBrushProperty);
|
||||||
set => SetValue(SelectedBrushProperty, value);
|
set => SetValue(SelectedBrushProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,7 +284,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal SolidColorBrush SelectedBrushWithoutOpacity
|
internal SolidColorBrush SelectedBrushWithoutOpacity
|
||||||
{
|
{
|
||||||
get => (SolidColorBrush)GetValue(SelectedBrushWithoutOpacityProperty);
|
get => (SolidColorBrush) GetValue(SelectedBrushWithoutOpacityProperty);
|
||||||
set => SetValue(SelectedBrushWithoutOpacityProperty, value);
|
set => SetValue(SelectedBrushWithoutOpacityProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +293,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal SolidColorBrush BackColor
|
internal SolidColorBrush BackColor
|
||||||
{
|
{
|
||||||
get => (SolidColorBrush)GetValue(BackColorProperty);
|
get => (SolidColorBrush) GetValue(BackColorProperty);
|
||||||
set => SetValue(BackColorProperty, value);
|
set => SetValue(BackColorProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
internal List<bool> ShowList
|
internal List<bool> ShowList
|
||||||
{
|
{
|
||||||
get => (List<bool>)GetValue(ShowListProperty);
|
get => (List<bool>) GetValue(ShowListProperty);
|
||||||
set => SetValue(ShowListProperty, value);
|
set => SetValue(ShowListProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@ namespace HandyControl.Controls
|
|||||||
private Button CreateColorButton(string colorStr)
|
private Button CreateColorButton(string colorStr)
|
||||||
{
|
{
|
||||||
var color = ColorConverter.ConvertFromString(colorStr) ?? default(Color);
|
var color = ColorConverter.ConvertFromString(colorStr) ?? default(Color);
|
||||||
var brush = new SolidColorBrush((Color)color);
|
var brush = new SolidColorBrush((Color) color);
|
||||||
|
|
||||||
var button = new Button
|
var button = new Button
|
||||||
{
|
{
|
||||||
@@ -527,7 +527,7 @@ namespace HandyControl.Controls
|
|||||||
var common = list[commonIndex];
|
var common = list[commonIndex];
|
||||||
list[maxIndex] = 255;
|
list[maxIndex] = 255;
|
||||||
list[minIndex] = 0;
|
list[minIndex] = 0;
|
||||||
common = (byte)(255 * (min - common) / (double)(min - max));
|
common = (byte) (255 * (min - common) / (double) (min - max));
|
||||||
list[commonIndex] = common;
|
list[commonIndex] = common;
|
||||||
BackColor = new SolidColorBrush(Color.FromRgb(list[0], list[1], list[2]));
|
BackColor = new SolidColorBrush(Color.FromRgb(list[0], list[1], list[2]));
|
||||||
|
|
||||||
@@ -575,7 +575,7 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
var matrix = _borderPicker.RenderTransform.Value;
|
var matrix = _borderPicker.RenderTransform.Value;
|
||||||
var x = max == 0 ? 0 : (1 - min / (double)max) * ColorPanelWidth;
|
var x = max == 0 ? 0 : (1 - min / (double) max) * ColorPanelWidth;
|
||||||
var y = (1 - max / 255.0) * ColorPanelHeight;
|
var y = (1 - max / 255.0) * ColorPanelHeight;
|
||||||
if (_isNeedUpdatePicker)
|
if (_isNeedUpdatePicker)
|
||||||
{
|
{
|
||||||
@@ -586,7 +586,7 @@ namespace HandyControl.Controls
|
|||||||
private void SliderColor_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void SliderColor_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
||||||
var index = Math.Min(5, (int)Math.Floor(e.NewValue));
|
var index = Math.Min(5, (int) Math.Floor(e.NewValue));
|
||||||
var sub = e.NewValue - index;
|
var sub = e.NewValue - index;
|
||||||
var range = _colorRangeList[index];
|
var range = _colorRangeList[index];
|
||||||
|
|
||||||
@@ -602,7 +602,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
if (!_appliedTemplate || !IsNeedUpdateInfo) return;
|
||||||
var color = SelectedBrush.Color;
|
var color = SelectedBrush.Color;
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb((byte)_sliderOpacity.Value, color.R, color.G, color.B));
|
SelectedBrush = new SolidColorBrush(Color.FromArgb((byte) _sliderOpacity.Value, color.R, color.G, color.B));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MouseDragElementBehavior_OnDragging(object sender, MouseEventArgs e)
|
private void MouseDragElementBehavior_OnDragging(object sender, MouseEventArgs e)
|
||||||
@@ -646,15 +646,15 @@ namespace HandyControl.Controls
|
|||||||
var scaleX = p.X / ColorPanelWidth;
|
var scaleX = p.X / ColorPanelWidth;
|
||||||
var scaleY = 1 - p.Y / ColorPanelHeight;
|
var scaleY = 1 - p.Y / ColorPanelHeight;
|
||||||
|
|
||||||
var colorYLeft = Color.FromRgb((byte)(255 * scaleY), (byte)(255 * scaleY), (byte)(255 * scaleY));
|
var colorYLeft = Color.FromRgb((byte) (255 * scaleY), (byte) (255 * scaleY), (byte) (255 * scaleY));
|
||||||
var colorYRight = Color.FromRgb((byte)(BackColor.Color.R * scaleY), (byte)(BackColor.Color.G * scaleY), (byte)(BackColor.Color.B * scaleY));
|
var colorYRight = Color.FromRgb((byte) (BackColor.Color.R * scaleY), (byte) (BackColor.Color.G * scaleY), (byte) (BackColor.Color.B * scaleY));
|
||||||
|
|
||||||
var subR = colorYLeft.R - colorYRight.R;
|
var subR = colorYLeft.R - colorYRight.R;
|
||||||
var subG = colorYLeft.G - colorYRight.G;
|
var subG = colorYLeft.G - colorYRight.G;
|
||||||
var subB = colorYLeft.B - colorYRight.B;
|
var subB = colorYLeft.B - colorYRight.B;
|
||||||
|
|
||||||
var color = Color.FromArgb((byte)_sliderOpacity.Value, (byte)(colorYLeft.R - subR * scaleX),
|
var color = Color.FromArgb((byte) _sliderOpacity.Value, (byte) (colorYLeft.R - subR * scaleX),
|
||||||
(byte)(colorYLeft.G - subG * scaleX), (byte)(colorYLeft.B - subB * scaleX));
|
(byte) (colorYLeft.G - subG * scaleX), (byte) (colorYLeft.B - subB * scaleX));
|
||||||
SelectedBrush = new SolidColorBrush(color);
|
SelectedBrush = new SolidColorBrush(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,17 +675,17 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
case "R":
|
case "R":
|
||||||
{
|
{
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, (byte)e.Info, color.G, color.B));
|
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, (byte) e.Info, color.G, color.B));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "G":
|
case "G":
|
||||||
{
|
{
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, color.R, (byte)e.Info, color.B));
|
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, color.R, (byte) e.Info, color.B));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "B":
|
case "B":
|
||||||
{
|
{
|
||||||
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, (byte)e.Info));
|
SelectedBrush = new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, (byte) e.Info));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -731,6 +731,6 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool CanDispose { get; } = true;
|
public bool CanDispose { get; } = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,8 +40,8 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static object CoercePageIndex(DependencyObject d, object baseValue)
|
private static object CoercePageIndex(DependencyObject d, object baseValue)
|
||||||
{
|
{
|
||||||
var ctl = (CoverFlow)d;
|
var ctl = (CoverFlow) d;
|
||||||
var v = (int)baseValue;
|
var v = (int) baseValue;
|
||||||
|
|
||||||
if (v < 0)
|
if (v < 0)
|
||||||
{
|
{
|
||||||
@@ -56,8 +56,8 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private static void OnPageIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnPageIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var ctl = (CoverFlow)d;
|
var ctl = (CoverFlow) d;
|
||||||
ctl.UpdateIndex((int)e.NewValue);
|
ctl.UpdateIndex((int) e.NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -113,7 +113,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int PageIndex
|
public int PageIndex
|
||||||
{
|
{
|
||||||
get => (int)GetValue(PageIndexProperty);
|
get => (int) GetValue(PageIndexProperty);
|
||||||
internal set => SetValue(PageIndexProperty, value);
|
internal set => SetValue(PageIndexProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Loop
|
public bool Loop
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(LoopProperty);
|
get => (bool) GetValue(LoopProperty);
|
||||||
set => SetValue(LoopProperty, ValueBoxes.BooleanBox(value));
|
set => SetValue(LoopProperty, ValueBoxes.BooleanBox(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void Viewport3D_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void Viewport3D_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
var result = (RayMeshGeometry3DHitTestResult)VisualTreeHelper.HitTest(_viewport3D, e.GetPosition(_viewport3D));
|
var result = (RayMeshGeometry3DHitTestResult) VisualTreeHelper.HitTest(_viewport3D, e.GetPosition(_viewport3D));
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
foreach (var item in _itemShowDic.Values)
|
foreach (var item in _itemShowDic.Values)
|
||||||
@@ -301,4 +301,4 @@ namespace HandyControl.Controls
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded 100 of 403 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user