Questions under development of Desktop C#

Asked

Viewed 268 times

0

I’m starting to program in c# and I’m having some doubts. I would like to know where to start, for example:

I have a desktop system that I use in one company, I needed to develop another in the same pattern. There is for example this dialog box below and I don’t know how to create, because I can’t import the Windows.UI library here in my I can only make the message:

Messagebox.Show("");

I find this very ugly tbm.. kk How do I make you like that other model?

inserir a descrição da imagem aqui

  • You already have some code started?

  • As a matter of fact, no. I start a project from the beginning, if I try to import that library: using Windows.UI, it says it did not find

1 answer

3


I started a project in Blend for Visual Studio 2013 generating the message by dialog. On the home screen I put an unnamed button with the inscription "Test":

Tela XAML

After that, I selected the button and searched the properties of the button for the events I can put on the button. Double-clicking on "Click", Blend created the event for me as shown below:

Evento Click

Finally, my source was like this:

Mainpage.xaml.Cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.UI.Popups; // Não esqueça de adicionar este using

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace App1
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
        }

        private async void Button_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            // Aqui crio uma mensagem de dialog e a exibo.
            MessageDialog dialog = new MessageDialog("Teste", "Teste Dialog");
            await dialog.ShowAsync();
        }
    }
}

The result was this:

Teste Final

  • I can develop systems that run on Windows 7 for this blend? And what’s the difference between this Blend and normal Visual Studio?

  • You can. Just use WPF instead of XAML when creating the application.

  • Blend just draws the windows and starts the events. Visual Studio is where the actual programming will be done.

  • I created a small systems by Visual, the appearance is not pleasant, I would like to make one with this appearance of windows 8.

  • You’ll have fun with the Blend then. It’s a full plate as appearance. Very cool visual effects.

  • Friend, but then how do I program you? I have to matter to the visual?

  • Only open Solution inside Visual Studio. Then you can only access the Back End layer without enhanced visual editing.

  • Do you know any tutorial or video that explains this basics? I opened them here, but I’m traveling completely... In the visual I don’t have access to any of these things.. I tried to download some business here and nothing helped

  • Yes, there is plenty of material on the Internet: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=xaml+tutorial+youtube&tbm=Vid

  • 1

    Thanks friend, helped me mto! vlw

  • Friend, one more question. Because I can’t import that using: using Windows.UI.Popups ?

  • Import as? I think it would be the case for a new question.

  • For example, if I want to use this button event and show this message you sent me in the reply. I’m not getting it. I can only make a message -> Messaging box.Show("Example")

  • Better open another question by exposing the code you have with the using which are noted at the source.

  • I’ll use that code of yours then. Thank you!

Show 10 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.