I'm used to windows forms but I'm trying to get the hang of the universal apps. I need an alternative to FlowLayoutPanel from windows forms, I'm trying to make the stack panel work in similar way but it's there's one problem - if my items reach the border of the panel they wont get to the next line they will simply move out of the visible area and appear invisible. What can i do about this ?
You are looking for VariableSizedWrapGrid
Related
I am looking for a grouped collapsible navigation control for use in one of the Windows 8.1 apps I have searched quite a bit and am not able to find this control.However I do find few existing apps in the store using this control, the mail app being one such example. Is there any collapsible grouped control available ?
Else I figure I should use a custom control with a button and an attached flyout
But the flyout would disappear if the user clicks anywhere else in the screen.
Windows Phone 8 has an Expander control in the form of the Windows Phone Toolkit but the performance is very poor when put into a ListView as you would do if you were trying to mimic the built in email app. The best way I've found to get the behavior you're after is to put all of the group header items into the ListView then use an ItemTemplateSelector to choose the visual appearance of group headers vs their items, then only add the child items (to the main ListView) when the group header is expanded. It sounds complicated but I wrote a blog about it here and there is a source example of it here and here
I have been working on a project in c# and I have the starting box size pretty small around, 700px by 450px.
Everything looks great on that size but when I maximize it, all the forms and etc stay the same size and just stick to the corner of the window.
I am curious if there is a way to get the boxes to adjust accordingly to the size of the actual windows form so if they click on the maximize button it doesn't look weird.
I have looked quite a bit online and everything I have tried doesn't seem to work. Also I am using visual studio 2013.
Thanks for the help!
I'm not sure I 100% understand what's going on, and please excuse me if I'm just saying things you already know, but controls inside of forms can be anchored. This helps because--for instance-- if a control is anchored on all sides then no matter how the form they reside in is resized they will grow with it.
The anchor property is in the property window.
As far as forms inside of forms that you would just have to grab the size property of the mdi window and grow the child forms based on this.
You could use the resize event in mdi form to fire off an interface method that all of your child forms implement maybe?
Learn how to use the Anchor or Dock properties to position and size controls relative to their container in WinForms
In a WPF application I have a user control that hosts a win forms RichTextBox control using the WindowsFormsHost. The user control is used in a panel that is made visible at a certain time. The problem is that the forms control is displayed a few moments before the containing panel. I tried delaying the display of the RTB until the panel is shown, but then the UI freezes for 2-4 seconds when the forms control is loaded. Please help if you know a solution to make the control load faster. Thanks!
You should use a profiler to see where most of the time is consumed, have a look here: What Are Some Good .NET Profilers?
I managed to find a solution for this :) Actually, the WindowsFormsHost had a Transparent background set, and just removing the transparency solved the performance problem.
I have such question: I have a ScrollViewer in my XAML/C# app for windows 8. Inside the ScrollViewer there is a Grid with dinamic count of Columns, I set ColumnDefenitions in code when program is loaded. But when I tryed to Scroll this grid in ScrollViewer with
scrollViewer.ScrollToHorizontalOffset(myOffset);
It scroll instantly, but I want it to scroll while some time, smoothly. Help me plz how can I do it?
It can be achieved using Storyboard, see following example (which can be also applied even to Windows Phone 8):
http://blogs.msdn.com/b/delay/archive/2009/08/04/scrolling-so-smooth-like-the-butter-on-a-muffin-how-to-animate-the-horizontal-verticaloffset-properties-of-a-scrollviewer.aspx
Edit:
New link: http://dlaa.me/blog/post/9857745 (backup)
I have a WPF application that loads a realtime live chart in a window,
But I end up having 10+ windows open on my desktop (as many windows as there are charts).
So my need is basically to group/embed all these WPF windows in a single window.
I tried WPF MDI but I had serious trouble since it requires the windows to be usercontrols instead, and in that case, my live chart displays but stays empty and does not refresh nor plots realtime data. Same behavior when I put my chart controls inside a Page instead of a Window (chart does not update). This is why I guess I really need to stick with windows at this point.
I welcome any simple & straight solution
Are you sure you want to have a last century MDI in your WPF application? I'd recommend to switch to other, less expensive and more flexible content arrangement. I'd organize the charts in some kind of scrollable or swipeable container, maybe with some kind of navigation or tabbing facility... If your users really want to have one or some charts in a separate window(s), let them drag the charts out of the main container and create separate window on demand (something like dragging a tab out of Interent Explorer).