Giter VIP home page Giter VIP logo

orc.controls's People

Contributors

0matyesz0 avatar alexfdezsauco avatar averus-a avatar ceo1647 avatar danpristupov avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dmitry-vf avatar geertvanhorrik avatar github-actions[bot] avatar gitter-badger avatar greenkn1ght avatar kote2ster avatar margaritache avatar michu avatar mkhomutov avatar mvacha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orc.controls's Issues

Design of Pickercontrols

asitis
asitshouldbe

As you see in the screenshots:
No space between the textbox and the buttons.
Textbox is higher then the buttons

Your .dependabot/config.yml contained invalid details

Dependabot encountered the following error when parsing your .dependabot/config.yml:

The property '#/update_configs/0/automerged_updates/0' of type object did not match one or more of the required schemas
The property '#/update_configs/0/automerged_updates/1' of type object did not match one or more of the required schemas
The property '#/update_configs/0/automerged_updates/2' of type object did not match one or more of the required schemas
The property '#/update_configs/0/automerged_updates/3' of type object did not match one or more of the required schemas

Please update the config file to conform with Dependabot's specification.

You can mention @dependabot in the comments below to contact the Dependabot team.

NumericTextBox up and down keys

Hi,

Look at this code:

if (e.Key == Key.Up && AllTextSelected) { OnUpDown(1); e.Handled = true; } if (e.Key == Key.Down) { OnUpDown(-1); e.Handled = true; }

This is found in NumericTextBox::OnPreviewKeyDown(KeyEventArgs e) method.
Is it ok that only up key checks whether all text is selected and down key is not checking ?
I can fix it if you wish.

Pinnabletooltip Placement Mode "Top" causes an exception

Steps to reproduce

  1. Open the Orc.Controls.Example.NET project
  2. Add orccontrols:PinnableToolTipService.Placement="Top" to the element in PinnableToolTipView.xaml
  3. Run the example, hover over the border and try to move the tooltip

Platform:
.NET version: CLR v4.0.30319 '(NET 452 I think)
Orc.Controls 3.1.0

Expected behaviour

That I can move the tooltip ;)

Actual behaviour

$exception | {"Value cannot be null.\r\nParameter name: otherVisual"} | System.ArgumentNullException

Backtrace:

   at System.Windows.Media.Visual.FindCommonVisualAncestor(DependencyObject otherVisual)
   at System.Windows.Media.Visual.TransformToVisual(Visual visual)
   at Orc.Controls.PinnableToolTip.GetTranslatedPoints(FrameworkElement frameworkElement) in C:\Users\Drachenkatze\Source\Repos\Orc.Controls\src\Orc.Controls\Controls\PinnableToolTips\Controls\PinnableToolTip.cs:line 581
   at Orc.Controls.PinnableToolTip.GetPosition() in C:\Users\Drachenkatze\Source\Repos\Orc.Controls\src\Orc.Controls\Controls\PinnableToolTips\Controls\PinnableToolTip.cs:line 288
   at Orc.Controls.ControlAdorner.ArrangeOverride(Size finalSize) in C:\Users\Drachenkatze\Source\Repos\Orc.Controls\src\Orc.Controls\Controls\PinnableToolTips\Adorners\ControlAdorner.cs:line 90
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.Documents.AdornerLayer.ArrangeOverride(Size finalSize)
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)```


Side effects of styles defined for DateTimePicker and DatePicker

Steps to reproduce

  1. Define a togglebutton and/or a ListBox with items for a WPF application
  2. Reference Orc.Controls
  3. Also bind the Orc.Controls default generic theme

Platform:
.NET version: 4.0

Expected behaviour

The theme for Orc.Control DateTimePicker and DatePicker shall not impact on default controls (non Orc.Controls)

Actual behaviour

The togglebutton or listboxitem default styles are impacted in a negative way (become invisible)

Additional information

By inlining the default theme from Orc.Controls and commenting out following resource dictionary references:
<!--ResourceDictionary Source="/Orc.Controls;component/Controls/DatePicker/Themes/DatePickerControl.generic.xaml" /> <ResourceDictionary Source="/Orc.Controls;component/Controls/DateTimePicker/Themes/DateTimePickerControl.generic.xaml" /-->

Then bad behaviour disappears. So these xaml are not boxed.

The Behaviour was ok in version 1.2.0, version 1.3.0 introduced the bad behaviour reported here (tested)

DateTimeFormatInfoExtensions.SetMonthFormat doesn't accept MMM which is a valid month modifier

if my system's short date format defines month as MMM (which is a valid month format)
image
image

DateTimeFormatInfoExtensions.SetMonthFormat fails since it hard-checks if the month format length is > 2 and raises an exception
ref : https://github.com/WildGums/Orc.Controls/blob/develop/src/Orc.Controls/Extensions/DateTimeFormatInfoExtensions.cs#L138

it's also worthy to note that MMMM is also a valid month modifier

suggested solution would be to increase the limit to length > 4 instead of 2

list of some valid DateTime formats : https://www.c-sharpcorner.com/blogs/date-and-time-format-in-c-sharp-programming1

Create StepBar control

In Orc.Wizard we have a control named "breadcrumb", but this name is misleading (wrong). We would like to extract it into a separate control in Orc.Controls so we can use it (even without the wizard):

image

image

We want this control to:

  1. Support Orientation (Horizontal / Vertical)
  2. Look similar to the one from Orc.Wizard (by default)

Then we want to have 2 subparts:

StepBar

Should have:

  1. Items (list of BreadcrumbItem / models)
  2. SelectedItem (to control which one is active)

StepBarItem (old breadcrumbitem)

Should have:

  1. Command (so we can enable clicking it if the command is active (executable))
  2. Label
  3. Icon

This way we can change the icon based on the state, etc.

Please think about the API before writing code and discuss any potential issues you are seeing. Note that we want to replace the "breadcrumb" in Orc.Wizard by this control so it should at least contain that functionality.

Because styles have no Key assigned, it's not possible to use them in BasedOn field for custom styles

Feature description

Discovered this when using TimeSpanControl
<Style ... BasedOn="{StaticResource {x:Type orc:TimeSpanControl}}"> wont work because x:keys are not set for default styles.

Inside WPF default styles the keys are set like this:

<Style x:Key="{x:Type TextBox}"
           BasedOn="{StaticResource {x:Type TextBoxBase}}"
           TargetType="{x:Type TextBox}">
</Style>

So the mentioned code would work for them. I think this project should follow this convention.

LogViewer problem

IF YOU DON'T ANSWER THIS TEMPLATE - THE BOT WILL AUTOMATICALLY CLOSE YOUR ISSUE!

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

  • [ X] WPF
  • UWP
  • iOS
  • Android
  • [ X] .NET Standard
  • .NET Core

Component

What component is this issue occurring in?
LogViewer

Version of Library

Compiles from sources, downloaded from repository today, 02/May

Version of OS(s) listed above with issue

Windows 10 x64

Steps to Reproduce

  1. Compile and run Orc.Controls.Example.NET
  2. Select "LogViewer" from the left list
  3. Catch the exception

Expected Behavior

Working

Actual Behavior

Catel.IoC.TypeNotRegisteredException
HResult=0x80131500
Сообщение = The specified type 'Orc.Controls.IApplicationLogFilterGroupService, Orc.Controls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' is not registered or could not be constructed. Please register type before using it. The type 'Orc.Controls.IApplicationLogFilterGroupService, Orc.Controls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' is not registered
Источник = Catel.Core
Трассировка стека:
at Catel.IoC.ServiceLocator.ThrowTypeNotRegisteredException(Type type, String message)
at Catel.IoC.ServiceLocator.CreateServiceInstanceWrapper(Func`2 createServiceFunc, ServiceLocatorRegistration registration)
at Catel.IoC.ServiceLocator.ResolveTypeFromKnownContainer(ServiceInfo serviceInfo)
at Catel.IoC.ServiceLocator.ResolveType(Type serviceType, Object tag)
at Catel.IoC.TypeFactory.TryCreateToConstruct(Type typeToConstruct, ConstructorInfo constructor, Object tag, Object[] parameters, Boolean checkConstructor, Boolean hasMoreConstructorsLeft, TypeMetaData typeMetaData)
at Catel.IoC.TypeFactory.CreateInstanceWithSpecifiedParameters(Type typeToConstruct, Object tag, Object[] parameters, Boolean autoCompleteDependencies)
at Catel.IoC.TypeFactory.CreateInstanceWithTag(Type typeToConstruct, Object tag)
at Catel.MVVM.ViewModelFactory.CreateViewModel(Type viewModelType, Object dataContext, Object tag)
at Catel.MVVM.Providers.LogicBase.ConstructViewModelUsingArgumentOrDefaultConstructor(Object injectionObject, Type viewModelType)
at Catel.MVVM.Providers.UserControlLogic.d__69.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Catel.MVVM.Providers.UserControlLogic.d__56.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Catel.MVVM.Providers.LogicBase.d__128.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Orc.Controls.Example.App.Main()

Изначально это исключение было создано в этом стеке вызовов:
Catel.IoC.ServiceLocator.ThrowTypeNotRegisteredException(System.Type, string)
Catel.IoC.ServiceLocator.CreateServiceInstanceWrapper(System.Func<Catel.IoC.ServiceLocatorRegistration, object>, Catel.IoC.ServiceLocatorRegistration)
Catel.IoC.ServiceLocator.ResolveTypeFromKnownContainer(Catel.IoC.ServiceLocator.ServiceInfo)
Catel.IoC.ServiceLocator.ResolveType(System.Type, object)
Catel.IoC.TypeFactory.TryCreateToConstruct(System.Type, System.Reflection.ConstructorInfo, object, object[], bool, bool, Catel.IoC.TypeFactory.TypeMetaData)
Catel.IoC.TypeFactory.CreateInstanceWithSpecifiedParameters(System.Type, object, object[], bool)
Catel.IoC.TypeFactory.CreateInstanceWithTag(System.Type, object)
Catel.MVVM.ViewModelFactory.CreateViewModel(System.Type, object, object)
Catel.MVVM.Providers.LogicBase.ConstructViewModelUsingArgumentOrDefaultConstructor(object, System.Type)
Catel.MVVM.Providers.UserControlLogic.UpdateDataContextToUseViewModelAsync(object)
...
[Стек вызовов обрезан]

PropertyChanged not fired on OpenFilePickerView

I have this code:

public class Settings : SavableModelBase<Settings>
{
 //fody properties
 public string AccountsPath {get; set;}
 [ExcludeFromSerialization]
 public string[] Accounts {get; set;}
 protected override void OnPropertyChanged(AdvancedPropertyChangedEventArgs e)
 {
      switch (e.PropertyName)
            {
                case nameof(AccountsPath):
                    LoadAccounts();
                    break;
            }
            base.OnPropertyChanged(e);
 }
private void LoadAccounts()
        {
            if (!File.Exists(AccountsPath)) return;
            Accounts = File.ReadAllLines(AccountsPath);
        }
}

And I have settings datawindow with OpenFilePickerView binded to Settings.AccountsPath.
When user choosed file property changed firing, but if user choosed same file again (edited in notepad, for example) property changed not firing. Can i fix that or i should manually update file if it is edited?

Error in DateTimePicker

IF YOU DON'T ANSWER THIS TEMPLATE - THE BOT WILL AUTOMATICALLY CLOSE YOUR ISSUE!

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

  • WPF
    I tried it here.
  • UWP
  • iOS
  • Android
  • .NET Standard
  • .NET Core

Component

What component is this issue occurring in?
DateTimePicker

Version of Library

? actual

Version of OS(s) listed above with issue

Windows 10

Steps to Reproduce

  1. Choose in Orc.Controls Example DateTimePicker
  2. I have Format "[de-IT]dd.MM.yyyy HH:mm" - it means without seconds
  3. Try to copy over menu

Expected Behavior

copy the Date and Time

Actual Behavior

  • Runtime error in DateTimeFormatter.cs in line 62 in function "internal static string Format(DateTime dateTime, DateTimeFormatInfo formatInfo)"
    "parts.Add(new KeyValuePair<int, string>(formatInfo.SecondPosition.Value, dateTime.Second.ToString(NumberFormatHelper.GetFormat(formatInfo.SecondFormat.Length))));"

you can solve it with:
if (formatInfo.SecondPosition.HasValue)
{
parts.Add(new KeyValuePair<int, string>(formatInfo.SecondPosition.Value, dateTime.Second.ToString(NumberFormatHelper.GetFormat(formatInfo.SecondFormat.Length))));
}

  • Runtime error in DateTimeFormatter.cs in line 96 in function "BuildFormatString(DateTimeFormatInfo formatInfo, List<KeyValuePair<int, string>> parts)"
    "builder.Append(parts[5].Value);"

you can solve it with:
if (parts.Count > 5)
{
builder.Append(parts[5].Value);
builder.Append(formatInfo.Separator6);
}

FilterBox control note binding to list

With this code (sample code modified):

namespace Orc.Controls.Examples.ViewModels
{
    using System.Collections.Generic;
    using Catel.MVVM;

    public class FilterBoxViewModel : ViewModelBase
    {
        #region Constructors
        public FilterBoxViewModel()
        {
            FilterSource = new List<KeyValuePair<string, string>>
            {
                new KeyValuePair<string, string>("1", "abcd"),
                new KeyValuePair<string, string>("2", "basdf"),
                new KeyValuePair<string, string>("3", "bwerr"),
                new KeyValuePair<string, string>("4", "oiydd"),
                new KeyValuePair<string, string>("5", "klhhs"),
                new KeyValuePair<string, string>("6", "sdfhi"),
            };

            ListOfPersons = new List<KeyValuePair<string, string>>
            {
                new KeyValuePair<string, string>("1", "Bill"),
                new KeyValuePair<string, string>("2", "Steve"),
                new KeyValuePair<string, string>("3", "John"),
                new KeyValuePair<string, string>("4", "Paul"),
                new KeyValuePair<string, string>("5", "George"),
                new KeyValuePair<string, string>("6", "Ringo"),
            };
        }
        #endregion

        #region Properties
        public List<KeyValuePair<string, string>> FilterSource { get; private set; }
        public List<KeyValuePair<string, string>> ListOfPersons { get; private set; }
        public string FilterText { get; set; }
        #endregion
    }
}

and this XAML:

<orc:FilterBoxControl Width="200" HorizontalAlignment="Left" PropertyName="Value" Margin="6,4,6,4" FilterSource="{Binding ListOfPersons}" Text="{Binding FilterText}" Watermark="Filter"/>

it appears the FilterSource is bounded to list FilterSource, and not list ListOfPersons as expected. It looks like the FilterSource is hard coded bounded to a property FilterSource.
Is this a bug or it is by design or I m not using it properly?

FilterBox Control does not display

I've documented an issue I have with the FilterBox control in the attached pdf (with screen shots). This, I think, explains succinctly the issue. It's a very quick read. The orc:FilterBoxControl simply does not show, neither in design mode nor in debug mode.
This may be a newbie problem. I appreciate any help. Thank you kindly.
Issue FilterBoxControl.pdf

[Feature]: MultiSelect ComboBox

Purpose

To introduce a new control to Orc's Control Ecosystem called a MultiSelect ComboBox. As shown below it can be either one of these variations (or both).

CheckedDropDownMock

Feature description

The premise of this feature is to introduce the supported concept of multiple item selection to a ComboBox. This would allow the implementer to leverage support for multi-value collections (such as a collection of strings, integers and so forth) in an easy to use form.

At a high-level the API for the control would have the following exposed properties:

Property Name Property Type Binding Mode
ItemsSource IEnumerable Two-Way
SelectedItems IEnumerable Two-Way
DisplayMemberPath string One-Way to Source
SelectedValueMemberPath string One Way to Source

DisplayMemberPath and SelectedValueMemberPath are leveraged properties for when the underlying ItemsSource type is of either IDictionary<TKey, TValue> or IEnumerable<KeyValuePair<TKey, TValue>> or a collection composing of business objects rather than primitive types.

Conjecture

If DisplayMemberPath is not defined then the ToString() method of the underlying type is called.

If SelectValueMemberPath is not defined, then the underlying type is used.

Final Notes

This is all preliminary and it is possible that feature development may be accelerated using some of the foundation of the ColorLegend control. I am willing to take ownership of this feature development once my time allows. The request for the feature is not due to a needed business requirement but rather a desire to contribute to the library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.