Winforms PropertyGrid without categories - winforms

How do I use a WinForms PropertyGrid so that no categories are displayed? The clip below from Visual Studio is an example of what I'm looking for. If I don't add a CategoryAttribute or use null for the category, it creates a "Misc" category. If I use " ", no category name is displayed (expected), but I still get the collapsible indent.
[1]: https://i.stack.imgur.com/DkjQn.png

You have to set the PropertyGrid.PropertySort to Alphabetical, which is just similar to the VS property window image you have attached, which then selects the 'alphabetical' icon. Also, if you want to hide the choice for categorized or alphabetical, you can choose to set ToolbarVisible to false.

Related

Infragistics UltraToolbarsManager - adding ApplicationDefaults to QuickAccessToolbar

Currently my QuckAccessToobar (QAT) shows only Show Below the Ribbon and Minimize the Ribbon options. I would like to add more options there, like in WordPad sample:
I found non infragistics related explanation here. It says about using QuickAccessToolbar.ApplicationDefaults property.
I found how to add tools to QAT itself (not dropdown) here. But there is no ApplicationDefaults property on ultraToolbarsManager1.Ribbon.QuickAccessToolbar
How can I add items to QAT dropdown so that users can check/uncheck them during runtime to display/hide buttons from QAT?
Turned out that ContextMenuTools property on UltraToolbarsManager.Ribbon.QuickAccessToolbar is exactly what I need.

how to bind controls of two different wpf windows

I dont know how to bind two controls from different wpf windows (for example: textbox from mainwindow and textblock from window1).
I`ve been looking for any example for ages, but my attempts are in vain. Please, send a link with an example of this or write code..
any help will be appretiated
p.s. sorry, my english is bad.
I don't think there is a way to directly bind 2 controls from different windows but you could use the Datastore for this, open your project in Blend and follow these steps:
Step 1. Add a window to your project and name it whatever you want.
Step 2. Add a Textbox control to your mainwindow and to the new window you created.
Step 3. go to the "Data" window and pick "Create data source" \ "New Data Store".
Step 4. the new datastore you created is added to your project with 1 field now named Property1, by default blend adds a text string to that field "value" you'll need to clear that one out, click on the "Edit data store values" and clear anything in the value field.
Step 5. now all you need to do is to bind both textbox's text property to that datastore field, check this image:
https://postimg.org/image/8nz5xki13/

Checkedlistbox, Textboxes, Output

I'm a novice in programming and I'm seeking advice on my program in visual basic (visual studio 2010).
I'll describe my aims of the program and how I've created a mock up.
My main interface will have several tabs. Within each tab, there will consist of a few textboxes for entering data and a few checkedlistboxes with a list of items in each of them.
What I'd like to do is to gather all the information inputted and/or clicked by a user of the program and to assimilate the information to a pre-formatted text box, that will give me the option to output it to a file. I'd like the pre-formatted textbox to gather the data from the different textboxes and checkedlistboxes from the various tabs. I can give an example (non-code) of what I mean:
Tab 1 of application:
textbox asking for name
textbox asking for date
checkedlistbox with items ("green", "blue", "red")
Tab 2 of application:
textbox asking for name of country
textbox asking for citizenship
checkedlistbox with items ("north", "south", "east", "west")
Tab 3 of application:
textbox that is "preformatted" to grab the data from the first two tabs so that I can save it to a textfile that would look like this
My name is Billy
Today's date is 31JAN2010.
I like: green blue red,
I come from United States of America.
I am American.
I am from the region of South
As of now, the method I'm using is largely inefficient. I'm just not knowledgable enough yet to do what I want do I've resorted to this strategy:
For checkedlistitems, I output the list of items to a textbox. I make this box invisible to the user. I then call this box in my tab 3, which has a button and text area. The button portion automatically codes the "preformatted" text and its a matter of referencing the invisible textbox which contains the item lists that were checked. One problem with this, or how I've programmed the checkedlist box, is that If I check something, and then uncheck it, it still appears in my tab 3 textbox.
For example, If I was a user using the 2nd tab and I clicked "South" but then unclick it and click "North", the textbox says
I am from the region of South North
I'm not sure which property or where in my code I need to alter so that it can remove items. I'm using a for loop to grab the items and don't have my code on hand.
In general, I'm just looking for strategies for programming something like this that will be efficient compared to what I have. Any suggestions / examples / code is well appreciated.
For your checkedlistbox, you can use the even SelectedIndexChanged that way when you change the selection, you won't have that problem:
example of how to use:
If you have a simple label for example :
Label1.Text = "I am from the region of " & checkedlistbox1.selecteditem.value
Btw in your case I don't think a for loop is necessary.
If you wish for information try w3schools or msdn.
Regards

Printing Multiple pages in wpf

I have a Scroll Viewer and inside that a text block with multiple pages contents.
How can I print everything within the Scroll Viewer.I'm Using WPF MVVM pattern.
Is text block is the right control for this?Or shall I go for any other WPF controls.?
Thanks in advance..
DocumentViewer ir a better control for paginated printing
I don't know what is exactly the problem,But something related to Printer.
From Control Panel->Printers & Fax
1.Right Click the Printer and take Printer preferences
2.Change the Source property to 'Manual Feed'& Apply.(Initially it was'AutoSelect')
3.Still got some error.
4.Again me changed the Source property back to 'Auto Select'& Apply.
5.Changed the Quick set Property to 'Defaults'& Apply
5.Now its Working Fine

How do I set a dynamic image in WP7 LongListSelector in GroupHeaderTemplate?

I am using the LongListSelector from the Silverlight for Windows Phone Toolkit.
For each group I would like to show a small group related icon, in the group header.
Group A
Item 1
Item 2
Item 3
Each of the items have the same key, and are grouping correctly. And each item has the same image. But when I change my GroupHeaderTemplate from the key to something else. It doesn't seem to handle this correctly.
Typically you see examples that use a "Group" object which is based on the IGrouping<TKey, T> style object which implements IEnumberable and has a single Key property.
However there is no reason why your group object can't also have a whole range of other properties like "Name" and "ImageSource" whatever that you will be able to bind in the group item templates.
Take a look # these two articles for insights on LongListSelector
WP7 LongListSelector in depth | Part1: Visual structure and API
WP7 LongListSelector in depth | Part2: Data binding scenarios
Can you show us some more information with regards to your source data and the XAMl that you're using. It sounds like you need to expose a path to the image you want for each group and then bind the Image element in the GroupHeaderTemplate to that property.

Resources