WinUI-Gallery icon indicating copy to clipboard operation
WinUI-Gallery copied to clipboard

Complet code of all samples of the XAML Controls Gallery

Open SEAFromJahu opened this issue 5 years ago • 6 comments

I would like to use some of XAML controls that is on the XAML Controls Gallery. How can I have a complete code example from each of control that is on XAML Control Gallery? Is that possible??? I'm trying to build some of then on Visual Studio but ... lack some code that XAML Controls Gallery dont show on documentation. And I can't go ahead with my learning curve. If there is a way to have the complete code from each control (XAML/C#/Classes...) please let me know how. Regards, Sergio Eduardo Antonio

SEAFromJahu avatar Jan 06 '20 19:01 SEAFromJahu

Hi @SergioEduardoAntonio!

Each sample includes a small snippet of code, but if you're looking for a more complete sample, you'll need to look at the code file itself. For example, if you wanted to see the complete sample for ComboBox, you can go to the ComboBox xaml and cs files:

  • Xaml File: https://github.com/microsoft/Xaml-Controls-Gallery/blob/master/XamlControlsGallery/ControlPages/ComboBoxPage.xaml
  • C# File: https://github.com/microsoft/Xaml-Controls-Gallery/blob/master/XamlControlsGallery/ControlPages/ComboBoxPage.xaml.cs

Each of the samples live in this folder: https://github.com/microsoft/Xaml-Controls-Gallery/blob/master/XamlControlsGallery/ControlPages

In terms of documentation, every page also has links to API and Guidelines links. For example, the ComboBox Gallery page has links to the following pages:

  • API: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.combobox
  • Guidance: https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/combo-box

Are there specific controls that you'd like to see more complete samples for?

stmoy avatar Jan 06 '20 21:01 stmoy

Hi Steven Moyes,

First of all I so glad with your answers,

Thanks so much for your readiness, and I’m sorry about my poor understand of XAML technology but I promises that I will learn it.

I’m trying to develop a project with need to use a List View like WhatsApp where each record has a column with a photo + another column with one or two lines of text(TextBlocks) + d the last column with another two lines with a short text in two TextBlock too.

Each of these tree columns need to be responsive with mouse clicks to change the view to another page that corresponding with the column and the record that has the tree colums contents.

Than when I so inside XAML Controls Gallery>Collection>the Updated ListView, “ListViews with Drag, Drop and Reordering Support, I sad “Here is what I need to learn” to do with my project. Then when I read all the information I stopped on many doubts, I tried to construct the same on Visual Studio 2019 Community but…without success.

If you have the complete code from the ListView that is inside XAML Controls Gallery that I can study and do changes to do what I need to do on my project I be so glad.

Presently I’m unemployed with 63 years old and I’m trying to have a project to sell on the Market.

Again I’m sorry about my poor English.

Regards for your attention,

Sergio Eduardo Antonio

SEAFromJahu avatar Jan 07 '20 01:01 SEAFromJahu

Hi @SergioEduardoAntonio - thank you for providing more information.

The complete ListView sample can be found in the following files:

  • XAML: https://github.com/microsoft/Xaml-Controls-Gallery/blob/master/XamlControlsGallery/ControlPages/ListViewPage.xaml
  • C#: https://github.com/microsoft/Xaml-Controls-Gallery/blob/master/XamlControlsGallery/ControlPages/ListViewPage.xaml.cs

@anawishnoff was the person who wrote these ListView samples and might be able to provide more information.

Additionally, it would be great if you could provide a picture/sketch/mockup of what you're trying to build so we can help provide more guidance.

The Xaml Controls Gallery is a big app with a bunch of code/infrastructure and it isn't a great "getting started" app. I'd recommend checking out the following resources which might also be useful:

  • ListView Drag and Drop Complete Sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlDragAndDrop
  • Win10 App development for absolute beginners series: https://channel9.msdn.com/Series/Windows-10-development-for-absolute-beginners
  • UWP Get Started Guide: https://docs.microsoft.com/windows/uwp/get-started/

stmoy avatar Jan 07 '20 23:01 stmoy

The Win10 App development for absolute beginners series is very³ outdated, but it's still a good point to start out, @SergioEduardoAntonio.

ghost avatar May 14 '20 11:05 ghost

In addition to the links @stmoy sent, there is also a link to the sample pages source code on every sample page now to make it easier to see the full source code for a sample.

marcelwgn avatar Aug 06 '20 18:08 marcelwgn

@SEAFromJahu Have your questions been answered and can this issue be closed? 😃

marcelwgn avatar Jun 25 '22 14:06 marcelwgn