Use datatemplate without listview - c#

I would like to know if it's possible to use a data template and a list system without the listview controller on xamarin forms.

You can definitely roll your own controls that use the templating engine. It would just take a whole lot of additional work with custom renderers for each platform etc. If you want to look into that you can check out the source code for Xamarin Forms since it's open source to see how they implemented the ListView. I think the negative voting is because this is quite a broad question that doesn't have an easy answer.

Related

How To Create Reusable Window Template/Model - WPF

Ok, I'll try to explain what I want to accomplish:
I'm quite new to WPF and XAML and I would like to create some domestic use applications with custom reusable UI. To be clear, I would like that every Window uses the same "Appearence" (specially the non-client area) without customizing every single one of them.
I've done some researches (obviously) and I found something that resembles perfectly what I'm trying to do: MahApps.Metro Template.
But I don't want to use some third party code because I like to have control all over my application and I want to customize what I want by myself. So I'd like to know what is the correct (and the best, maybe) way to do so. I've read plenty of posts about Window customizing but I didn't find anything that explained how to do that in that way.
I hope to have well-explained myself and I thank you all in advance for the help!
If you want to make custom UI in XAML you should learn to use Expression Blend. Here is a resource you can try -
Inspirational Textbox Styles (Source code available)
There are several videos available on youtube on Expression Blend for making custom UI in XAML. You can try that.

Display data in a table in Universal App

I have been looking for a couple of days for a UWP control that has similar functionality as the WPF ListView, which allows me to create a table like appearance.
Is there a control like this in the UWP or not?
What I want to achieve is a SCRUM and Kanban overview for Jira Software. Maybe there are better options.
Microsoft has created an add-on control that fits this use case nicely, the DataGrid control from their community toolkit.
More details: https://learn.microsoft.com/en-us/windows/communitytoolkit/controls/datagrid
It supports sorting, filtering, grouping, and can even generate columns automatically from supplied data.
There is a control such as that and it is called listview.
https://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.listview.aspx
Maybe you could use GridView as well, there is a nice short tutorial on:
https://channel9.msdn.com/Series/Windows-10-development-for-absolute-beginners/UWP-040-Data-Binding-to-the-GridView-and-ListView-Controls

Managing Autorotation in Windows 8 metro apps

How can i manage Autorotation Windows 8 Apps.
I have gone through the "Rotation" Sample from MSDN but it is hell lot confusing, what I need to do is , I need to have completely different view when in Portrait and a diiferent one in Landscape.
I have designed my view for Landscape when I need to make changes for Portrait View. I need a way to dynamically switch between to views of re-shuffle the views.
By far the easiest way to deal with this is to inherit your page from LayoutAwarePage instead of Page and leverage the Visual State Manager inside of Expression Blend to do all of the work for you.
I have a full article with lots of pictures and a downloadable sample application here:
http://jaredbienz.wordpress.com/2012/04/22/wp-to-w8-view-states-using-visual-state-manager/
You're definitely going to want to use a FlipView control here. I don't know if you're using JavaScript/HTML5 or C#/XAML, but it is available in either case.
There's a great sample on MSDN to show you how to do it, but without more context on your issue, I don't know how much more I can assist.
http://code.msdn.microsoft.com/windowsapps/FlipView-control-sample-18e434b4
You can handle orientation changes in two basic ways...
1) The brute force approach. Wire into the orientationchanged event...
Windows.Graphics.Display.DisplayProperties.OrientationChanged += DisplayProperties_OrientationChanged;
In the event handle, check the orientation and navigate to a page that has been specifically layout out for that orientation...
if (Windows.Graphics.Display.DisplayProperties.CurrentOrientation == DisplayOrientations.Portrait)
this.Frame.Navigate(typeof(PortraitPage));
Pros... easy to design pages optimized for given orientations
Cons... need to handle navigation and state data between pages
2) Create a single page that changes its layout using visual states. You would still wire into the orientationchanged event, but make calls to VisualStateManager.GoToState(this,"Portrait",true).or something similar depending on how you name your visual states.
Pros... change layout without navigation and you can add cool animations easily
Cons... more complex layout could be harder if you are not comfortable with advanced xaml layouts and viewStates
If you look at the sample templates (besides blank) they include a LayoutAwarePage that handles the viewstate transitions for you, simplifying things a bit.

How can I create/skin a C# UI?

Ive been working on a C# project for a while now and I fell it needs change its look.
I have found a UI kit that I really like, which can be seen below:
http://medialoot.com/item/transparent-ui-kit/
Does anyone know how to do this?
Thanks
EDIT: Im using WinForms
EDIT2: Maybe I should convert over to WPF? Is this doable?
You can subclass most common controls and draw their appearance yourself. However, unless for novelty applications I doubt your users will thank you for doing so.
Your example is a library of controls. For you to have an appearance such as that you'll have to create or acquire a similar library of controls and replace all your controls in your project to get that appearance.
If you want to update colors (background, foreground, etc.) and such you can make a class that recurses through controls and sets the settings using reflection and a switch statement to process each control. Then just run this on each form before you show it. One word of caution about this, some controls don't respect your changes and get overridden with themes from the OS (datetimerpicker being the biggest culprit). You'll also need to consider whether your users will appreciate the extra work put in for color/appearance changes.
If you don't have very good design skill and have a good know how about creating such templates, its better to buy them.
And C# is just a language. You're looking to create templates and skins for either for ASP.NET website/application or for windows forms.
Have a look at DevExpress Skins
If you can afford it.

A good listview component for C# WinForms

Does anyone know of a good listview component other than the one included with Visual Studio (as it looks kinda boring)?
Devexpress are good too. http://devexpress.com
(Quick edit missed the Winforms bit). For Winforms controls, I'd recommend Telerik.
If you want to modify the look of your form and controls try DotNetSkin. You can modify controls from existing windows themes or your own controls by modifying it.
If you want a free ListView, you should try ObjectListView, it has a LOT of features.
You better be careful about the license if you want to use it in a commercial product though. See these answers for more information about the license: here and there.
You may try Better ListView.
It has native look and feel. It also supports many nice features, like hierarchical items, multi-column sorting, data binding, three-state check boxes... the list goes on :-)
It is not a ListView wrapper, but self-contained control so it fixes all inherent flaws of .NET ListView (these are enumerated on ComponentOwl's website).
Take into account the 10Tec iGrid control:
Its main features are:
Multi-column sorting with indication in column headers.
Grouping and autofilter are also available.
"Subitems" (cells) can be edited.
Rows can have different heights.
Rows/cells can be formatted dynamically easily.
Built-in incremental search.
TreeListView mode.
No flickering and fast work with 100'000+ rows.
To find out more, start from reading this article:
Editable ListView Replacement
See also other cross-referenced articles on the site.

Categories

Resources