It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to wpf.I know well to use Grid control.But i don't know where should i use GridSplitter,the use of GridSplitter and why should i use it.Please tell me the difference.
A grid is used for layout. For example, you can say your grid has 2 columns and 2 rows with Width="*", then they will size automatically to take up a quarter of the space.
Now if you want to resize them (like with the navigation pane on the left of windows explorer, you can drag the border to change its width), you can use a GridSplitter. That enables you to grab the edge between the grid's columns (or rows) and resize them.
The grey line that you can drag is a GridSplitter:
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Can we set margin of various controls depending on different resolution scales in Windows 8 application using C#?
I have tried dictionary object for ResolutionScale
You might want to check out the ViewBox control. My teammate Jeff wrote a great post on it here. Basically, you can put items in a ViewBox, and then the ViewBox will scale them appropriately within that amount of space.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to implement stretch image function, user can drag each corner to stretch and pinch the image to make it smaller or bigger. Anyone can help? I use C# and xaml.
Basically you have to write the following on yourself:
Add the Image in XAML
Add four squares
position the squares to the edge
add a mousedown handler to the squares and save the square on mousedown to a property
add a mousemove handler to your application, check if the property is filled
resize the image by calculating the image size. For example for the right-bottom corner (pseudo code):
image.width=square.offset.x-image.offset.x
image.height=square.offset.y-image.offset.y
Add a mouseup handler to your application and release the square-property.
This is very basic. There are lot of good examples out there, mostly for WPF, but you can reuse it for Windows 8. This is a good one, but for image cropping.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
When I run my application on another PC the positions of components on the form is incorrect, for example my labels go off the edge of the Panel and TextBoxes overlap buttons.
My application is a Windows Forms application.
What could be the cause of this?
Following could be the reasons for this
1. Screen Resolution
2. System Font Size
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
When the user right clicks a DataGridView cell in my windows application it clears and fills the CheckedListBox with column header text. Then it shows a popup. Now how can I sort the items using what is checked? I want to sort on the same right click.
To sort the listbox, you need to write your own small code, which "tells" the program how to sort your data.
Please refer this tutorial
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Maybe this isn't a new question; but unfortunately I'm unable to solve my problem.
My Form needs to show scrollbar, but I don't want use scrollbar all the time.
I want to know how to show the ScrollBar only in specific conditions.
For example:
I want to set specific Form Position without using / showing the scrollbar when form is out of working area boundaries.
Thus my question: How to move Form Horizontally without using scrollbar?
Update: It seems still my question is unclear.
Please find bellow the following conditions:
Form requires ScrollBar functionality when the form border is smaller than the page.
Show ScrollBar when the Form is out of Working Area boundaries.
I wait for your useful replies!
You can set the AutoScroll to false and then update the scroll values programmatically:
this.HorizontalScroll.Value = this.HorizontalScroll.Maximum;