Im actually trying to make a control, which acts like the chromes most visited page(Screenshot e.g. here: http://www.favbrowser.com/wp-content/uploads/2011/10/googlechrome15.jpg), which automatically center, resize and move the controls(in my program)/pages(in chrome) if the window was resized.
I know that I could take a FlowLayoutPanel or a TabelLayoutPanel to implement this, but this would take much time espacially for the resize and moving part.So my question is: Is there already an open source/free Control which features sth like that?
Any help will be greatly appreciated.
Related
I've been making a stock tracker app in C# with Windows Forms for fun, besides a few issues everything is going relatively well.
Except: I don't know how to make the lay-out do what I want it to do. In particular, I want to makes sure that a set of buttons (add, delete, exit) within a TableLayoutPanel at the bottom always remain in the same space with the same size. I've tried things like docking, setting Min/Max sizes, anchoring, locking but I just can't seem to get it right. They will keep moving around/changing shape.
I've recorded a short video to illustrate my point: https://puu.sh/IszTh/7c31c8e846.mp4
Anyone have any advice? I didn't think it would be necessary to show the code but if you do need it just tell me to edit this post.
As Jimi pointed out in the comments to the question, I hadn't set the absolute value for the TableLayoutPanel containing previously mentioned TableLayoutPanel.
I have a Windows Modern App with a custom cursor, that is implemented by having an image that follows the system's cursor.
I just add the custom cursor image to the main grid of my application and everything works fine.
public MainPage() : base(true)
{
this.InitializeComponent();
MainPageGrid.Children.Add(new CustomCursor());
}
But when a popup opens, it gets above my custom cursor. Is there anyway that I can set the Z-index (or something similar) of a component in order for it to be the uppermost visual component of my modern application?
I would recommend using an actual custom cursor. I think this article looks like a decent intro to using these. You could also check this question for some tips on changing cursors. Other than that - I don't think you can tell when a random popup opens. You can poll for these with VisualTreeHelper.GetOpenPopups(), and then do something to make your popup show on top (maybe just reopening would work or maybe you'd need to create a new one every time) but that might not give you a good user experience or performance. You could also figure out all the events that could display a popup from ComboBoxes, Flyouts etc, but that sounds painful. It would probably be best to create an attached behavior that you could attach to all such popup-source-elements to trigger z-index fix-ups of your XAML-rendered custom cursor...
There is no need to implement a component as a custom cursor, as it is possible to override the maximum size limitation:
How to override maximum 32x32 mouse size in Windows like this program can
I am in the process of learning C# as I am most familiar with C++ so if there is a simple answer to this question please forgive me. Also thank you for taking the time to read this, I appreciate it!!! :)
I am currently in the process of creating a program similar to MS Paint. I would like to be able to draw text on a panel. I've found the .DrawString() which can apparently be used to do exactly this, though in all of the examples I've seen they have coordinates predefined and do not allow the user to choose where to place it. I want this to be similar to MS Paint by allowing the user to click and drag to make the size of the box the text shall appear in. I am not concerned about allowing them to move the text around once the rectangle is drawn with the text.
I was originally thinking to have them type their string into a textbox and then draw it onto a rectangle so they could size it appropriately to fit their string since the string should wrap inside of the rectangle. So I have two questions:
How can I have the text wrap around the rectangle and obviously cut
off anything that does not fit (again similar to MS Paint)?
By drawing a rectangle (if my idea is plausible of course) it will
leave a border around the text since it is making a rectangle. I do
not want this border, I only want the text. How can I achieve this?
I have an image, And I want to create an effect like Windows 8 start menu when user clicks on it.
I mean, if this is my image:
When user clicks on it, it should change to something like this:
I mean, a little 3D effect.
How to create this effect in code behind? (On MouseDown event)
As you requested I'm posting my answer again:
Solution to your issue is covered by another SO question:
C#/WPF image transformation over a trapezoid
Hope this time it wont be automatically converted to comment :)
say your silverlight area on a webpage is 200px by 200px.
you open a child window, is there a way to make it moveable outside the 200x200 silverlight area?
or say you drop down a combo box, let the drop down go out side of the 200x200 aea?
Thank you
Sorry there isn't any practical way to do this.
(There are is a fairly ridiculous/heroic option suggested in the duplicate thread mentioned in the comment above...)