Custom number picker? - c#

Is there an easy way to make a number picker for windows phone 7 that is similar to the timepicker control? I want go have custom ranges of 0-99 : 0-59 . 0-9. Google, bing, and msdn seem to be very vague with information on the subject.
I found an article that describes exactly what I want to do here. Now my problem is that the article is old and if I type toolkit: in my XAML code, no suggestion comes up for a loopingselector. If I go into my toolbox, right click, choose items. There are no controls for a loopingselector or infinite list selector.
The source code also doesn't work. It gives a bunch of errors in the XAML file that I am unable to remedy.
I am kind of at a loss on what to do here.
I am using Visual Studio 2010 / c#4.0.
Thanks in advance

Make sure that you are using the right namespace. LoopingSelector is in Microsoft.Phone.Controls.Primitives namespace. So your xmlns should be something like:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit"

Related

C# AutoComplete TextBox with 'contains' rather than 'starts with'?

In my application I need a TextBox with the AutoComplete feature that will suggest options based on contain sub-string, rather then start with sub-string. Current Visual Studio 2022 default implementation for this does only start with filter.
I found an answer here from 5 years ago, that implements this feature from scratch, both the TextBox and the dynamic ListBox. Trying to use it I found that the mouse does not work with the list.
I wanted to ask if this feature was not already solved by the C# libraries, and have to be implemented from scratch?
It sounds to me that if I could only override the compare function of the default implementation then this could work, but I did not find where to do this.
Will be happy if someone could direct me to the correct way to do this.
Thanks, PazO

Which WPF element was used for the Visual Studio code editor?

According to this post, Visual Studio was rewritten using WPF. I'm trying to figure out what Element is used for the code editor window (specifically C#, if there's a difference) but I can't figure out which element could have all of that functionality (obviously with a lot of extra work. But still...).
I want to know this is so that I can experiment writing my own little code editor. (Yes, I know a full-fledged editor is a very large project. I'm talking about a simple custom one.)
After a quick Snoop I can see that the base element is:
Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView so it is very much a custom job.
I don't know what access you can get to the libraries but there is documentation around the namespace here:
https://msdn.microsoft.com/en-GB/library/microsoft.visualstudio.text.editor.aspx

Trying to make a Visual Studio 2015 Add-In: SDK, API.... (Reagrding ribbon or whatever its called)

I have been trying to get my head around the SDK API for visual studio for a while now. The problem is I know what I want/need to do. However I can not find a code example or API documentation anywhere that allows me to do what I want :(
I know its possible just I cant find documentation to show how.
I want to add another sidebar ribbon for all open files similar to how the breakpoint works (And many test add-ins for VS, NCrunch comes to mind...) that is blank as standard but when clicked allows some logic to be run to add a comment on that line.
Once added a Icon will be then displayed on that line allowing you to click the icon to view/edit the left comment. (The storage of this etc. is not a problem with the implementation I am doing) I just really need to know how to tell the API to add a new ribbon/side thing and plumb in the required logic :/
If this isn't possible I also had the idea of highlighting the word and again a icon popping up but that seems even more annoying to implement hence why I chose the side option if it is at all possible :/
Thanks in Advance to anyone who helps :D
The "sidebar ribbon" is called an editor margin. See Editor Extension Points.
Implement an IWpfTextViewMargin interface to define a margin. You must
also implement the IWpfTextViewMarginProvider interface to create the
margin.

Is it possible to change the GUI of a checkbox in C#, asp.net?

I tried searching but can't find any answer to my inquiry.
Here goes.
I want to change the GUI of the checkbox in a CheckBoxList, using asp.net and C#.
For example, I would like to see a ([] unchecked state) ([x]checked state)
instead of the standard checkbox.
1.Is this doable in C# asp.net, webform?
I've found a tutorial on WPF Styles and Control Templates, but this is all new to me, it
says I have to use MS Silverlight, and coding within the control template of an .xaml file.
2.Is this the only solution?
3.I've noticed how to add tags while writing down my question, can someone tell me how this is implemented? (This is the end result I had in mind)
Due to spam prevention, I can't post images, please see link:
http://i50.tinypic.com/2dvqzc3.jpg
Thanks for your time.
There could be various ways depending on what and how you want to achieve the effect.
1. CSS
2. Custom control from scratch
3. JQuery
Please check some links provided below
Change Style/Look of Asp:CheckBox using CSS
ASP.NET checkbox with custom design
http://blogs.digitss.com/javascript/jquery-javascript/jquery-fancy-custom-radio-and-checkbox/
code.google.com/p/jquery-checkbox
Hope that helps

How to build a simple source code editor using WPF?

Hello there and Merry Christmas !!!
I am new to WPF and I am trying to build a text editor for a assembly language. The assembler provides me a two lists:
a list of errors
a list of warnings
My editor should have the ability to inport the contents of a file and display it in a text-panel. I want it to be similar to Visual Studio. Line numbers on the side. And a tabbed pane for the warning/error messages.
Each list element contains the line number as an Int and a String that contains the error/warning message. (It would be really cool if I could click on it in the tabbed pane and it would jump to that line and highlight it.)
How I said I am new to WPF, I don't know the control library and I don't have too much time to dig and get friendly with google.
So I would really appreciate it if someone could point me to at least the controls I need to develop my GUI.
My best regards,
John
Free one http://blog.bodurov.com/Wpf-Source-Code-Editor
All I has for you is two links:
CodeyProject
Commercial one (SandDock)
Our SyntaxEditor for WPF control was just released to the public last week. It is a syntax-highlighting code editor control similar to the Visual Studio 2010 editor. You can find more info about the control here:
www.actiprosoftware.com/Products/DotNet/WPF/SyntaxEditor/

Categories

Resources