I was wondering if it was possible to create a list that has check boxes in place of bullets.
I want to create a lengthy list of questions inside RichTextBox and would like it to automatically place a small check box prior to each question. Much like it would place a bullet after each time I press 'enter'. I don't see a check box as an option in the list of bullets.
WPF RichTextBox doesn't support checkbox as bullet. For your requirement you need to add check box as InlineUIContainer in RichTextBox.Here is sample to play with flowdocument
Related
Here is my need. I think a user control is what I need but I am not sure if its the best or even how to use it.
What I have. My main window has a menu with a "help" menu. When you click help, a new window opens, I have a column, At the top of the left column has a drop down box of "Major Titles", a ListBox below that that populates based on the combo box selection. This will be about 25% of the window width. All this works.
When I select an item in the list box a page,contentControl or user control is displayed to the right with verticle scroll bars so the window does not need to resize, the information I display that changes based on the list box selection will have only visuals like text block, label, images. There will be no user interaction with the changeable pages Just formatted Data.
What would be the best way to approach this? Can anyone offer an easy example?
I was thinking of using a user control and change the user control based on the selected list box item.
Ok, I got this figured. After reading a lot of posts and blogs. Seems people sometimes want to make things more complicated then they actually are.
What I wanted, a permanent list box on the left 1/6 of the window. The list box contained string names for "help subjects". On the right 5/6 of the screen I added a groupbox with header and in group box I added a usercontrol. The content of the control is bound to a property called 'ActiveView'. The list box selected value property is bound to 'SelectedListItem' property.
When you change it set 'SelectedListItem' a method is called 'SetActiveControl'. SetActiveControl has a switch/case that sets like in the example:
``Case "Setup":
ActiveView = new SomeSelectionViewModel();
Break;
I have created a user control in a folder inside the Views folder called HelpControls, I also created the same folder in ViewModels. I have classes matching the user controls and everything is bound together.
Ultimately when you click the list box item, the associated ViewModel is called and in turn populates the user control on the window with the appropriate data.
I need to later look into, using one ViewModel for all the controls, I know that can be done using Cal:Model.View = ViewModel name. In the xaml of the control. I'm just not sure how to call the appropriate user control view when an item is selected. Either way this would become a view first design and I thought I read, Caliburn. Micro was intended as a ViewModel first design.
I need a control that allows a sequence of controls to be edited. Each control has a single associated value and the value of an editable sequence would be the sequence of those values. Editing the sequence refers to adding new elements, deleting existing elements and reordering elements.
I've written an editable sequence control that displays a dock panel with a list box, up and down arrows and a text box. Entering text into the text box and pressing return adds a new element with that name. Pressing the up or down arrows moves the currently selected element. Pressing DELETE when an element is selected removes it.
I'd like to examine other options. Do any built-in WPF controls provide this functionality? How might I compose existing controls to create what I need? Are there commercial solutions that would make my life easier?
EDIT: For example, it would be more user friendly to allow elements to be reordered using drag-and-drop. What is the easiest way to accomplish this?
realy i don't know what i should title this problem, i hope to "WPF UI Related question" is accept able.
consider something like that form who you explore a class diagram in Visual Studio.
you select any class object in window and than right click on it then you select "Properties" menu Item and then a window will pups up that allow you to change selected class object.
or something like Auto Cad. when you draw a line you can right click on it and then select Properties menu item and then with appeared window you can change line's properties (like color of line or any thing like that).
now i want to create an application with an User Interface like these who mentioned on upper lines.
i want to create an UI that i cad draw circle and squares on it (with mouse clicks) and then when i want a "Properties" window will appeared to change objects's properties.
also with this capability that wheeling mouse wheel up-down will results in zoom in/out the screen (like Auto CAD).
finally my question is that is there any kind of frameworks or pre created controls that i can use them for achiving these goals or i have to implement all these my self?
thanks all and sorry for my bad english..
You can use this for your property grid:
WPF Property Grid
for giving zoom capability i use this and for property windows i use this.
thanks to Yogesh...
I've written an 'auto-suggest' textbox user control in WPF. It behaves a little bit like the 'To' list in Hotmail, allowing the user to enter a list of items, offering suggestions when it is able.
The main controls are a a text box, a wrap panel and a list box. The text box captures user input. The wrap panel contains the text box and shows previous entries. The list box is used to show suggestions. Most of the time, the list box is hidden.
I'm using multiple instances of my control in a stack panel.
My problem is that when the list box is shown, it is included in the measurement of the height of the control. This forces the following controls in the stack panel to be shifted down, as these pictures demonstrate:
alt text http://img13.imageshack.us/img13/8366/example1a.png
alt text http://img208.imageshack.us/img208/7664/example2a.png
I've tried overriding the measurement of my control so not to include the list box, but this just results in the list box not being visible.
What I want to do is make the list box overlay any subsequent controls in the stack panel, like a combo box's drop down would do. However, I really don't know how to do this. Any ideas?
Thanks
Sandy
You might want to have a look at the Popup control. That is what the ComboBox uses to display its options. Good luck!
Try this instead of your text box / list box combination: A Reusable WPF Autocomplete TextBox
I want to create a combobox with some style. I dont want old dropdown what we are getting. I want some new dropdown which looks very nice. Is there any way to create a dropdown like that.
Plz give me suggestions
Check this link out on msdn. This is the actual control template for the combo box. You can copy and paste this into your application (within your app's Resources).
Create a form and slap a combo box on it with some data in it. Then start changing the control template and view the results. Start off simply by changing colors and adding borders around elements to see what controls which part. Then you can start switching out larger parts of the template to match what you're looking for.
one can start with the standard combobox, and then use various controls and styles to change the look and feel of the control, and it's corresponding drop down.