handyorg / handycontrol Goto Github PK
View Code? Open in Web Editor NEWContains some simple and commonly used WPF controls
Home Page: https://handyorg.github.io/
License: MIT License
Contains some simple and commonly used WPF controls
Home Page: https://handyorg.github.io/
License: MIT License
调用messagebox.show()时会出现一个大白框,demo中调用这个接口的时候好像依赖demo项目中的一堆资源文件:
Style = ResourceHelper.GetResource<Style>("MessageBoxCustom")
鼠标需要悬停在滚动条上,滚动滑轮,才能实现滚动;
由于MarkDown不是很识别代码,有代码被吞的情况,将复现代码上传在附件中:
CodeReview.txt
Is your feature request related to a problem? Please describe.
Actually the border radius of TransitioningContentControl is hard coded in the XAML code of the control.
It's a bit problematic when you have a side menu next to it which has no border radius. This is the result :
Describe the solution you'd like
The corner radius should be an option so that we can set it or not.
Additional context
Temporary fix : put the TransitioningContentControl in a grid and set it's background to {x:Null}
then set the grid's background to the wanted color
Describe the bug
使用 hc:BlurWindow
时,鼠标拖动窗口特别卡顿而且伴有延时。
To Reproduce
Steps to reproduce the behavior:
HandyControlDemo_Net_GE45
Environment (please complete the following information):
Describe the bug
While using the textbox, i enabled ShowClearButton. When the clear btn is pressed, it clears the text in the view(Good) but the binded text property still retain it previous value and won't update on any further text changed. Seems like the binding to the ViewModel property is broken.
<hc:TextBox
Margin="2,5"
hc:InfoElement.ContentHeight="40"
hc:InfoElement.Necessary="True"
hc:InfoElement.Placeholder="Account Code"
hc:InfoElement.Title="Account Code"
CharacterCasing="Upper"
FontWeight="Regular"
ShowClearButton="True"
Text="{Binding AccountCode, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
TextWrapping="Wrap" />
Link to video
https://cloud.igeeksng.com/index.php/s/gBHmgR9fowKyKgb
Hello, I think it's time to add netcoreapp3.0 to TargetFrameworks
:)
Hi,
i have hiDPI display and i tried new Demo (version 1.5.4). The context content window seems to be blurred AKA it's not DPI aware.
The context menu looks fine:
To Reproduce
Just compile & run demo (version 1.5.4) and go to Notify Icon Section. You must have HiDPI monitor in order to reproduce this bug.
Expected behavior
Clear font render, DPI Awareness
Environment:
Hi, I have downloaded your package, but when I open the project with Visual Studio I am notified which this is dangerous for my computer why?
由于目前HC的TabControl不支持绑定,所以我在后台代码中去添加TabItem,出现了下面动图所式的情况。
这个问题在窗体大小改变后、tabitem关闭后,左右的滚动也会存在异常的情况。
代码在附件.zip中:
HandControlTest.zip
是否支持商业应用?
Describe the bug
When you get to 100%, you can still see the wave of the WaveProgressBar
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'm not sure we're supposed to see the wave when we are at 100%
Environment (please complete the following information):
Hello,
i just wondering if wouldn't be better just split Image sprite into pieces, save it to List or Array and then enumerate that collection with interval delay so each piece would be like a image frame.
I've installed HandyControl for VS2019 extension. I have created a new .net core HandyControl project.
In MainWindow.xaml where is
Style="{StaticResource WindowWin10}"
I get wavy underline with message: 'Window' TargetType does not match type of element 'Window'
Hello,
I try to use SideMenu.
I've seen in wiki the way. In my ViewModel, I have a Command. I would like to bind this command to the SideMenuItem. There is no Command member for SideMenuItem. I know how to do it for MenuItem. How to do it for SideMenu? Is there any other way without MVVMLight that is used in the Demo App?
Thanks
最好是可以分组的那种,比如下拉后显示如下这种格式
分组一(文字,不可选中)
可选内容一
可选内容二
可选内容三
分组二(文字,不可选中)
可选内容一
可选内容二
可选内容三
谢谢。
hi, If we use handycontrol in .NETCore3, then after a while (Building and running several times) Visual Studio will hang
I tested netcore3 without using the handycontrol , and Visual studio did not have a problem
例如:
1、错误 未在类型“CompareSlider”中找到可附加的属性“TargetContent”。
2、错误 命名空间“clr-namespace:HandyControl.Controls;assembly=HandyControl”中不存
类似这样的几百个。
Hi,
can you make tabs in TabControl scrollable ? Like i Firefox? :)
Describe the bug
Window control cannot show title
To Reproduce
Steps to reproduce the behavior:
<hc:Window x:Class="HandyControlDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:HandyControlDemo"
xmlns:hc="https://handyorg.github.io/handycontrol"
Style="{StaticResource WindowWin10}"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<ComboBox HorizontalAlignment="Left" Margin="227,100,0,0" VerticalAlignment="Top" Width="120"/>
<GroupBox Header="GroupBox" HorizontalAlignment="Left" Height="289" Margin="444,83,0,0" VerticalAlignment="Top" Width="271"/>
</Grid>
</hc:Window>
Expected behavior
Can show the title "MainWindow"
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Is it possible to change the language of this repo to English? At least for codes and package? These are a great set of control libraries and it will be really helpful if it could be used worldwide, not just for a specific region.
Is your feature request related to a problem? Please describe.
I think that this control is a bit limited because we are not able to choose a transition type.
Describe the solution you'd like
It would be nice to add few Transition Effects (I'm inspired by this)
1:希望增加AutoComplete控件
2:希望CoverFlow控件支持填充任意UserControl,而不仅仅只是封面图片
TKS!~
Is your feature request related to a problem? Please describe.
I don't understand Chinese and some of the issues are written in Chinese. When I look for a solution before opening an issue it's quite difficult. For example, I have a problem with BlurWindow and I saw a closed issue related to BlurWindow but I don't know what it is about because when I try to translate (I'm french), as the page is half english half chinese, I translates from English to french and chinese stays the same.
Describe the solution you'd like
I think It would be nice that everyone creates their issues in english so that people over the world understand them.
Describe the bug
When you add Rate control in the Window.NonClientAreaContent it crashes
To Reproduce
Steps to reproduce the behavior:
DefaultValue
or Count
Expected behavior
Rate show in Window.NonClientAreaContent
Environment (please complete the following information):
Additional context
Here's the code. If you don't put the DefaultValue
and Count
property it won't crash but just won't show. If you set them, it crashes with SystemOutOfRangeException
<hc:Window.NonClientAreaContent>
<StackPanel Height="29">
<Menu HorizontalAlignment="Left">
<MenuItem Header="Header1">
<hc:Rate DefaultValue="5" Count="5" Foreground="{DynamicResource DangerBrush}" Icon="{StaticResource LoveGeometry}"/>
</MenuItem>
</Menu>
</StackPanel>
</hc:Window.NonClientAreaContent>
why wrap all demo in a TransitioningContentControl ?
for what ?
hi first of all, tnx for great and beautiful controls, if possible please add Dark and Light Themes for controls
also please add more controls like this:
Datagrid control
Textbox
PasswordBox
Label
Slider
Scrollbar
Listview
Listbox
Checkbox
Calendar
DateTime Picker
and more...
Describe the bug
调用Carousel控件,编译提示System.Exception错误,调用栈提示在HandyControl.Controls.Carousel.CheckNull()位置,但是运行正常不出错
The link in the readme to AppVeyor is dead saying project not found.
Very Much
Describe the bug
I cannot bind the PasswordBox
's Password
property to a static string (for example from Properties.Settings.Default). Error is :
Cannot define 'Binding' of 'Password' property of type 'PasswordBox'. You can only define a binding on an DependencyObject 's DependencyProperty
To Reproduce
Steps to reproduce the behavior:
hc:PasswordBox
Password
propertyExpected behavior
Value binds
Environment (please complete the following information):
Additional context
XAML Code :
xmlns:properties="clr-namespace:Watchguard.Report.Properties"
<hc:PasswordBox x:Name="TxtPassword"
Password="{Binding Source={x:Static properties:Settings.Default},
Path=Password, Mode=TwoWay}" />
Describe the bug
if we want to change borderbrush when control focused and we use same color in 2 different control, we get different result
To Reproduce
Steps to reproduce the behavior:
1.Create new Project with HandyControlProject (Core3 or NetFramework)
2. Write this code
<Grid Background="#0A060E">
<Grid.RowDefinitions>
<RowDefinition Height="70"/>
<RowDefinition Height="180"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<StackPanel Margin="20,20,20,0">
<StackPanel Orientation="Horizontal">
<TextBlock Foreground="#B1C7CE" Text="Create Board" FontSize="20" HorizontalAlignment="Left"/>
<Button Cursor="Hand" Command="hc:ControlCommands.Close" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Margin="230,0" VerticalAlignment="Top" HorizontalAlignment="Right" hc:IconElement.Geometry="{StaticResource CloseGeometry}" Style="{StaticResource ButtonIcon}"/>
</StackPanel>
</StackPanel>
<StackPanel Margin="20,10" Grid.Row="1">
<TextBlock Foreground="#B1C7CE" Text="Board Name" FontSize="18" HorizontalAlignment="Left"/>
<hc:TextBox hc:InfoElement.Placeholder="Type a name for your board... [Ctrl Enter] to save" Margin="0,10" Background="#1a252f">
<hc:TextBox.Style>
<Style BasedOn="{StaticResource TextBoxExtend}" TargetType="hc:TextBox">
<Setter Property="BorderBrush" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</hc:TextBox.Style>
</hc:TextBox>
<TextBlock Margin="0,15,0,10" Foreground="#B1C7CE" Text="Board Group" FontSize="18" HorizontalAlignment="Left"/>
<hc:ComboBox Background="#1a252f" hc:InfoElement.Placeholder="Select a group for your board">
<hc:ComboBox.Style>
<Style BasedOn="{StaticResource ComboBoxExtend}" TargetType="hc:ComboBox">
<Setter Property="BorderBrush" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</hc:ComboBox.Style>
</hc:ComboBox>
</StackPanel>
<Separator Background="#1E3F4E" Grid.Row="1" VerticalAlignment="Top"/>
<Separator Background="#1E3F4E" Grid.Row="1" VerticalAlignment="Center"/>
<Separator Background="#1E3F4E" Grid.Row="1" VerticalAlignment="Bottom"/>
<Button Command="{Binding CreateBoardCommand}" Width="150" HorizontalAlignment="Right" Margin="20,0" Grid.Row="2" Content="Create Board" Style="{StaticResource ButtonSuccess}"/>
</Grid>
Expected behavior
same color in both control
Environment (please complete the following information):
I also reported this error in wpf repo
But I think it's a problem of handycontrol because it chooses PrimaryBrush instead of InfoBrush
GE45的2.1版本,ComboBoxBaseStyle的Height变更为MinHeight,导致控件的默认外观异常。
影响控件 ComboBox
不影响控件 hc:ComboBox
在2.0版本中表现正常
2.0样式
2.1样式
如果使用了Style = "{StaticResource WindowWin10}" ,图表的坐标网格绘制出现错位
To Reproduce
Steps to reproduce the behavior:
ResourceDictionary>
ResourceDictionary.MergedDictionaries>
ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
</ResourceDictionary.MergedDictionaries>
引用OxyPlot绘制一张普通线性图
private static PlotModel CreatePlotModel2(bool isSmooth = false)
{
var model = new PlotModel();
model.Axes.Clear();
var verticalAxis = new LinearAxis { Position = AxisPosition.Left, IsZoomEnabled = false, IsPanEnabled = false };
verticalAxis.Title = "温度值";
verticalAxis.Unit = "℃";
verticalAxis.TickStyle = TickStyle.Outside;
verticalAxis.MajorGridlineThickness = 1;
verticalAxis.MinorGridlineThickness = 1;
verticalAxis.MajorGridlineStyle = LineStyle.Solid;
verticalAxis.MinorGridlineStyle = LineStyle.Dash;
verticalAxis.MajorStep = 100;
verticalAxis.MinorStep = 25;
model.Axes.Add(verticalAxis);
var horizontalAxis = (new LinearAxis { Position = AxisPosition.Bottom, IsZoomEnabled = false, IsPanEnabled = false });
horizontalAxis.Title = "时间";
horizontalAxis.Unit = "秒";
horizontalAxis.TickStyle = TickStyle.Outside;
horizontalAxis.MajorGridlineStyle = LineStyle.Solid;
horizontalAxis.MinorGridlineStyle = LineStyle.Dash;
horizontalAxis.MajorStep = 1;
horizontalAxis.MinorStep = 0.25;
model.Axes.Add(horizontalAxis);
var s1 = new LineSeries
{
Title = "LineSeries1",
Color = OxyColors.Red,
MarkerType = MarkerType.Circle,
MarkerSize = 6,
MarkerStroke = OxyColors.White,
MarkerFill = OxyColors.Red,
MarkerStrokeThickness = 1.5,
MarkerResolution = 1,
Smooth = isSmooth,
CanTrackerInterpolatePoints = true,
};
s1.Points.Add(new DataPoint(1, 380));
s1.Points.Add(new DataPoint(2, 480));
s1.Points.Add(new DataPoint(3, 380));
s1.Points.Add(new DataPoint(4, 380));
s1.Points.Add(new DataPoint(5, 380));
s1.Points.Add(new DataPoint(6, 380));
s1.Points.Add(new DataPoint(7, 380));
s1.Points.Add(new DataPoint(8, 380));
s1.Points.Add(new DataPoint(9, 380));
model.Series.Add(s1);
return model;
}
在MainWindow.xaml:
<oxy:PlotView Grid.Row="1" Model="{Binding Model}" SnapsToDevicePixels="True"/>
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Hi,
when i click on Notify Tray Icon, the context menu open every time in bottom-right corner. No matter where is my cursor.
To Reproduce
Compile & Run Demo (version 1.5.4) and go to Notify Icon section.
Expected behavior
Menu will open next to the cursor
Environment (please complete the following information):
I try to use ProgressButton/ToggleButton to show busy condition.
<ToggleButton Name="ImportButton"
Command="{Binding ImportCommand}"
Style="{StaticResource ToggleButtonLoadingPrimary}"
IsChecked="{Binding Progress.IsProcessing}"
Content="Import"/>
The command is a DelegateCommand from Prism.Command library in my ViewModel.
The problem is that I have to click 2 times to make it work! The first time I click nothing happens.
The ToggleButton looks pressed but the command is not run.
The second time I click then it runs successfully.
Workaround:
Add Click event with
ImportButton.Command.Execute(ImportButton.CommandParameter);
The problem with this is that if I click again before the processing is finished, then the processing starts again and there is a conflict with the first run. Looks like the first click activates only click event and the second click runs the Command.
Do I miss something?
public void Register()
{
//自动注册
container.RegisterTypes(AllClasses.FromLoadedAssemblies(), WithMappings.FromAllInterfaces, WithName.TypeName, WithLifetime.PerResolve);
}
Microsoft.Practices.Unity.DuplicateTypeMappingException:“An attempt to override an existing mapping was detected for type System.Windows.Media.Composition.DUCE+IResource with name "TimePicker", currently mapped to type MaterialDesignThemes.Wpf.TimePicker, to type HandyControl.Controls.TimePicker.”
Hi,
can you please make release 2.x with demo and upload it on Github Releases with changelog?
What an excellent job you have done. Thanks so much.
Could you add these common controls to your new plan, to make them more beautiful:
hi can we use buttonIcon style with text?
this is a simple button that only show a text
<Button
Content="{x:Static langs:Lang.Danger}"
Style="{StaticResource ButtonDanger}" />
this is a IconButton that only show a icon
<Button
controls:IconElement.Geometry="{StaticResource AddGeometry}"
Style="{StaticResource ButtonIconDanger}" />
so i tested this but only show icon
<Button
content="Something Text"
controls:IconElement.Geometry="{StaticResource AddGeometry}"
Style="{StaticResource ButtonIconDanger}" />
switch样式按钮宽度变大,效果不会变
MouseWheel on Clock BorderTitle only change se
zxzxzxzxzx.zip
c (no effect in minute and clock)
I have added TabControl in a wpf page and bind the itemsource from viewmodel. But whenever I am closing a tab and trying to remove it from tabcollection it show me error.
**Environment
I would like some help. I don't know if this is the correct place to ask!
I try to change the theme at run time, like the HandyControlDemo.
In App.xaml I have:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
in App.xaml.cs I have:
internal void UpdateSkin(SkinType skin)
{
var skins0 = Resources.MergedDictionaries[0];
skins0.MergedDictionaries.Clear();
skins0.MergedDictionaries.Add(new ResourceDictionary
{
Source = new Uri($"pack://application:,,,/HandyControl;component/Themes/Skin{skin.ToString()}.xaml")
});
var skins1 = Resources.MergedDictionaries[1];
skins1.MergedDictionaries.Clear();
skins1.MergedDictionaries.Add(new ResourceDictionary
{
Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
});
Current.MainWindow?.OnApplyTemplate();
}
}
This method is called with the correct SkinType like the Demo, but the skin is not changing. What do i miss?
Thanks.
我是逗比,只要能写出的逗比代码我就会写出来
我看到 HandyControl.Controls.TextBox 很高兴,因为听说里面可以写校验的方法
我看到了 Func<string, OperationResult> VerifyFunc 属性,这个属性就是用于写校验代码的,我看到我的小伙伴在界面用了 TextBox 于是我就帮他添加一点有趣的代码
public void F1()
{
TextBox.VerifyFunc = s => new OperationResult<bool>()
{
Data = true,
Message = "林德熙是逗比",
ResultType = ResultType.Failed
};
}
public void F2()
{
TextBox.VerifyFunc = s => new OperationResult<bool>()
{
Data = true,
Message = "林德熙不是逗比",
ResultType = ResultType.Success
};
}
请问在不知道 F1 和 F2 的调用顺序和被多少次调用请问每次校验的时候返回的是什么?其实我也不知道
也许我也会将这个函数用于做回调
TextBox.VerifyFunc += s =>
{
Console.WriteLine("用来文本改变了");
return null;
};
这个控件很好用,只是没有做好防逗比
希望轮播能加入触摸滑动
上传代码不检查一下的么
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.