Giter Club home page Giter Club logo

blackpearl's Introduction

BlackPearl WPF Control Library

Build Status NuGet BlackPearl NuGet BlackPearl GitHub Gitter


About repository

This repository is created to put different basic WPF Custom-control/User-controls under same roof. These controls solve basic and frequently faced issue by developers. As of now, this contains only one custom-control MultiSelectCombobox. In future, I'm planning to add more.

BlackPearl is licensed under MIT license.


Content:


MultiSelectCombobox

Overview

WPF has ListBox control which lets user select more than one item. However, ListBox control UI doesn't have in-built support for searching/filtering. Developers have to do work around to provision one. Moreover, lot of mouse interaction is required. Yes, you may be able to do all completely using keyboard. But, not most efficient way of doing. On the other hand, Combobox has a very good UI which supports searching and filtering. However, it doesn't support multiple selection.

What if we can combine behavior of ListBox and goodness of Combobox UI? MultiSelectCombobox exactly does the same thing. It provides functionality of searching/filtering with multiple selection. MultiSelectCombobox tries to mimic UI behavior of ComboBox.


Feature

  • In built support for searching and filtering
  • Extensible to support custom searching and filtering for Complex data type
  • Ability to create and add new item which is not part of source collection (through LookUpContract for complex types)
  • Easy to use!

blackpearl's People

Contributors

guenterrudigier avatar nilayjoshi89 avatar siogabx 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

Watchers

 avatar  avatar  avatar  avatar

blackpearl's Issues

SupportsNewObjectCreation property doesn't do anything.

Describe the bug
I have some properties that will throw exception in get and set if some other dependent property is not properly set. For this reason, I have implemented custom LookUpContract and set SupportsNewObjectCreation to false, just to avoid creating objects, since they should only be created in backend and just filtered on the UI.

If you put the breakpoint on SupportsNewObjectCreation it will never be hit. At what point this property gets called ?

To Reproduce
1.Create object such as :

class Test
{
private int _num;
private string _text
public int Num {get; set;}
public string Text {get {if _num == 99 throw exception else return _text }; set {}
}
  1. Create collection and pass it to the UI
  2. Provide custom LookUpContract implementation setting public bool SupportsNewObjectCreation => false;
  3. Put breakpoint on this property
  4. Start the app, add one item, add another, then try to delete items
  5. Reaches get of the Text property, resulting in crash

Expected behavior
Not to call getter of this property, and don't create a new instance

BlackPearl 1.0.2.1
.net core 3.1 WPF app

BlackPearl | Bug | Popup placement issue

Describe the bug
If Control shrinks when Popup is open, it does not reposition itself.

To Reproduce
Steps to reproduce the behavior:

  1. Select many items
  2. Press down key so that pop-up opens up
  3. Remove one selected item such that it shrinks control vertically
  4. Popup does not reposition itself

Expected behavior
Popup should reposition itself if main control shrinks or grows

BlackPearl | Bug | Pasted text gets ignored

Describe the bug
Text that is pasted into the MultiSelectComboBox is ignored and not treated as typed text.

Steps to reproduce the behavior:
Copy-paste anything into the control, the popup will open showing matching suggestions as you would expect but if you try to type ";" to create a new entry, nothing happens as if the box is empty, unlike when I type it out, then it works just fine.

If I paste something and then continue typing, it will only match with what I have typed, the pasted text right before it gets ignored. And if you paste something, continue typing and press ";" to create a new entry, only the typed text will be included in the new entry, the pasted text gets removed.

Pasted text also keeps its original formatting because of the RichTextBox which includes font size and color which looks very jarring, it should just paste as plain text, not as formatted text.

Desktop (please complete the following information):

  • OS: WIN 10 build 19044.1766
  • BlackPearl Version 2.0.2

BlackPearl | Feature | Instantly Open Suggestions On Focus

Is your feature request related to a problem? Please describe.
The users using MultiSelectCombobox in my project, might not know the exact content in it, so they need to have an intuitive way to see the available items from get-go - aka: see all available items when the click on control.

Describe the solution you'd like
When you click on the MultiSelectCombobox - it should have an option to open suggestions instantly instead of needing to press down key or start typing to show all/available suggestions.

Describe alternatives you've considered
I've tried to find something to bind to, so I can open it with some method in the code-behind, or at least modify the text inside and do something like a spacebar + backspace combo to open it, but ether I couldn't find a workaround or in fact - it does not exist :/

BlackPearl | Bug | Minor issue fixes

Describe the bug

  • While suggestion drop-down is open and up is pressed several times, it stops changing selected index after one point

  • RichTextBox loses focus after selection

  • Control crashes if Shift+Left/Right Keys are used while drop-down is closed

  • if selected item contains any of the existing item, items after that does not get added to SelectedItems list.

  • Fixing NuSpec

To Reproduce
N/A

Expected behavior
N/A

Screenshots
N/A

Desktop (please complete the following information):

  • Version 1.0.1.0

Additional context
N/A

BlackPearl | Feature | Delay search by configured time for performance

Is your feature request related to a problem? Please describe.
When larger data-source is assigned, control searches across all items on each and every char input. This degrades control performance and overall user experience.

Describe the solution you'd like
User tent to enter more than one character at a time. Hence, rather than triggering look-up on every key press, a delay should be added and wait for user to finish.

Describe alternatives you've considered
NA

Additional context
NA

BlackPearl | Feature | Make creating new items more intuitive

Is your feature request related to a problem? Please describe.
Creating a new item by adding the separator character at the end is not a very intuitive user experience when they encounter the multiselect combobox for the first time, as it requires the users to:

  1. know they need to end it with a separator character
  2. know what the separator character is

Most people will just type in what they want, and be confused when it gets deleted as soon as they click away.
When they select an existing item first, they will see the ";" at the end and probably figure it out but it could be a lot better.

Describe the solution you'd like
Looking at how email clients handle adding email recipients, these are some solutions they use:

  1. create a new entry when focus is lost instead of deleting it
  2. create a new entry when users press Tab
  3. create a new entry when users press Enter

Another, more elaborate and probably overkill option would be to add the new entry in the dropdown that states that it will create a new item, this is how github handles selecting/creating branches and tags as shown here.

afbeelding

The main thing is to add options. The more ways there are to do it, the higher the chance the user will find one of them so while one of these options would already help a lot, the more the better.

Describe alternatives you've considered
Now I just explain in a little textbox that they need to terminate items with ";", which isn't very professional.

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.