Posts by perozzo • 2,653 points
101 posts
-
3
votes1
answer314
viewsA: Progress bar in second window
Since you want a second Form with a progress bar, I suggest you transfer the code from the copy of the files to that second Form. The moment you call it, the copying process will start and the…
-
0
votes1
answer170
viewsA: Change Button name via WPF code?
This is not the most appropriate way to do this (the correct would be using Binding, but it is not the focus of the question), but here it is: Set the name of your button in the file .xaml of his…
-
1
votes1
answer1121
viewsA: Postasjsonasync Failure - Webapi - C#
I will put an example of the method I use in my projects and to this day never gave me a headache. It’s a little different than yours, I think maybe these details will make a difference. private…
asp.net-web-apianswered perozzo 2,653 -
0
votes2
answers119
viewsA: Query sql SELECT
According to the information provided: SELECT comentario FROM comentario WHERE usuario = "usuario_1" Deducing that the name of the column that stores the comments is comentario, that your table name…
-
0
votes1
answer791
views -
0
votes1
answer577
viewsA: How do I fill a listbox c# mysql
You can use the property DisplayMember of ListBox to choose what to show. 1. Create a class First, create a class that will serve as the object of your list. For example, a class called SomeData,…
-
0
votes0
answers50
viewsQ: Wrong binding in <select> ASP.NET MVC <option>
When I give a post in the form for the Controller, the Binding in asp-for="VehiclePlate" picks up the value of option of select (@vehicle.Category). However, I want to catch the text of option of…
-
2
votes0
answers72
viewsQ: Upload files. only in Xamarin Android
I’m trying to convert a class Java for C# in the Xamarin.Android. The class Java that’s the one: private native boolean OpenDeviceCtx(Object obj); public native boolean CloseDevice(); public native…
-
0
votes1
answer67
viewsQ: Relationship in tables in the database
I have a table in the database called Veiculo and it has the following fields: placa, renavam, marca, cor and categoria. To the placa and renavam is all right, since the data are unique. My question…
-
2
votes2
answers8176
viewsA: CPF Mask and Date of Birth Asp.net MVC
You can use a mask library on jQuery created by the Brazilian Igor Escobar. It is possible to create almost any type of mask with the library. https://igorescobar.github.io/jQuery-Mask-Plugin/…
-
1
votes1
answer134
viewsQ: Elapsedeventhandler syntax in System.Timers.Timer
There’s a difference between starting a Timer thus: _timerExam = new Timer(); _timerExam.Elapsed += new ElapsedEventHandler(OnTimedEvent); _timerExam.Interval = 1000; _timerExam.Start(); And so?…
-
1
votes1
answer586
viewsA: Problem with accentuation
I solved the problem using Html.Raw() when sending texts to javascript. It’s a safe way to insert texts into javascript. The Html.Raw() returns strings without html encoding. Html.Raw Using…
-
0
votes1
answer586
viewsQ: Problem with accentuation
I’m populating a list on javascript through a ViewBag. To ViewBag has a list of objects and these objects have properties with accented words. They are coming correctly from ViewBag, but when I add…
-
2
votes1
answer1346
viewsA: How to use POST on a json for an Http server
First, I’ll change your class Pedro, to a class called Pessoa and arrange classifications. Decide whether to use properties in English or Portuguese. In this case, I will use the properties in…
-
0
votes1
answer32
viewsQ: View Binding for Controller does not work in "disabled" fields
I use the property asp-for in the elements of my View to pass their values to the Controller at the time of post page. <input id="txtExamNumber" asp-for="ExamNumber" class="form-control" />…
-
3
votes3
answers68
viewsA: Error in if ultimalization
First: The declaration of variables that count numbers that are even and odd should be made outside the loop for, otherwise they will always be reset to each executed loop. According to: Your…
-
0
votes1
answer82
viewsA: Errors with version . NET Core
The error relates to the version of your project. It is configured for version 1.0 of .NET Core and you have the version 1.1.2 and the 2.0 installed. Right-click your project and select Properties.…
asp.net-coreanswered perozzo 2,653 -
0
votes1
answer282
viewsA: How to identify the applicationId?
What he’s requesting is the name of Package of your app. To find it, right-click on your project and select Properties. On the open screen, select Android Manifest and look for the item Package…
-
2
votes1
answer51
viewsA: Form running after closed
It’s probably his own Timer which is still running on some thread. First declare your Timer as a class variable so that it can be accessed later: PictureBox pictureBox1 = new PictureBox(); // Have a…
-
1
votes1
answer1031
viewsA: How to make a textbox receive only numbers
You can use the event PreviewTextInput of TextBox. 1. Layout (XAML) Add the Previewtextinput event to your Textbox: <TextBox HorizontalAlignment="Left" Height="23" Margin="10,181,0,0"…
-
0
votes1
answer85
viewsA: Mahapps - Changing the Style of a Tile with Binding in a class property - MVVM
To access a style or some resource specific to your application, you can search for it by name using the method FindResource(). To use this method, its class must belong to FrameworkElement, such…
-
0
votes2
answers167
viewsA: Set an image
Defining image by XAML You are using the bars backwards. The correct one would be: <Image Width="60" Height="60" Stretch="Fill" Source="/Images/Tiles/clientes.png" /> It is also possible to…
-
1
votes3
answers185
viewsA: Animation in images
1st solution (simple) In the method onClick from your image, add the following code: imageView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) {…
-
0
votes1
answer112
viewsA: Mahapps - How to create Menu User Button in the Application Title Bar
There is a similar example in the Mahapps documentation itself. XAML Put the following code inside the tag Controls:MetroWindow in your layout file Window:…
-
6
votes1
answer1806
viewsA: Reportviewer MVC Core
It does not work and for now will not work in the Core version of ASP.NET. Microsoft is only evaluating the creation of a control . NET Core Reportviewer. Which means there is no present (08/2017).…
-
1
votes1
answer420
viewsA: Problems running/publishing WEP API on IIS10!
Who uses Roslyn for publication If your project has references Roslyn and you are interested in posting it on a iss server, you will probably get unwanted errors on your website since many providers…
-
1
votes2
answers135
viewsA: Documenting and testing methods of an ASP.NET Core Web API
Yes, there is. A widely used tool for what you are asking for is Swagger. What is the Swagger? Swagger is a project composed of some tools that assist the REST API developer in some tasks such as:…
asp.net-web-apianswered perozzo 2,653 -
1
votes3
answers62
viewsQ: Memory and processing - Variables and verification
Is there a big difference for memory and processing in how to perform the verification in these two examples? If yes, why and how they both behave when executing the codes. Method 1: var exam =…
-
3
votes2
answers446
viewsA: How to check for async processes running
The right and most effective way to verify this is through Tasks. 1. Turn your method into a task Let’s turn your method into one Task so that it is possible to use the Directive await, if you want…
-
1
votes2
answers158
viewsA: I can’t get the value of a combobox with WPF
It is necessary to make a cast for a ComboBoxItem. var item = cbxCereais.SelectedValue as ComboBoxItem; var text = item.Content.ToString(); This occurs because the items of a ComboBox are treated as…
-
-1
votes1
answer1838
viewsA: Where to insert JS and CSS files into HTML?
In my opinion the best practice is to put the CSS inside the tag head: <head> <link rel="stylesheet" href="css/layout.css" type="text/css"> </head> And the Javascript files before…
-
3
votes1
answer367
viewsA: How to install Tortoisesvn on Deepin?
How to install software similar to Tortoisesvn. Rabbit VCS The command to install Rabbit is this: sudo add-apt-repository ppa:rabbitvcs/ppa sudo apt-get update && sudo apt-get update…
-
2
votes2
answers742
viewsA: I can’t get a variable from another namespace
I created two projects: Consoleapp1 and Consoleapp2. What you should do is add the reference to ConsoleApp2 in the project ConsoleApp1 to access the variables of ConsoleApp2 in the project…
-
2
votes1
answer261
viewsA: Mahapps and WPF - How to apply "enhance" effect when I pass the Mouse over a Tile
All you need is one trigger which corresponds to the event IsMouseOver and change the background color when True, and use the original color when False. 1. Creating a Style for the Tile We will…
-
1
votes1
answer95
viewsA: Migrating from site to another server
First check the Service Plan of the app (Resource) which you used to host your site on Azure. Probably the Source you are using is a Web App. If the Service Plan that you are using in your Source…
-
6
votes2
answers3157
viewsA: Start Windows Forms program in the background
Minimize the application to the Tray system is done with the control NotifyIcon of Visual Studio. NotifyIcon is in namespace System.Windows.Forms. 1. Notifyicon control Drag and drop control…
-
0
votes2
answers229
viewsA: Alignment of HTML fields
Try it that way: <div class="row"> <div class="col-md-4 col-sm-4"> <div class="form-group form-group-default input-group"> <label>Data Inicial</label> <input…
twitter-bootstrapanswered perozzo 2,653 -
0
votes1
answer456
viewsA: Textview does not appear for some reason
The statement of Android libraries on root of your layout was duplicated and misspelled. I already corrected this in the editing of your post. But I created a layout new and tested in my app. It’s…
-
0
votes2
answers1483
viewsA: Compress image size
Try using this library. It’s simple and easy to use. Compressor
-
2
votes3
answers330
viewsA: Listbox selection
After moving the item, place the same as the one selected through your index. listBox.SelectedIndex = newIndex; If you do not have access to the desired index, save it in a class variable.…
-
4
votes2
answers324
viewsQ: What is the correct way to use Runonuithread() in Xamarin.Android?
When I need to update a field on the UI, I need to run this code on the UI thread? For example: I have to change my layout Activity. The code I’m using is this: RunOnUiThread(() => {…
-
0
votes1
answer101
viewsA: Create an image with Blur effect in Xamarin.Android
I just converted the Java code to Xamarin.Android. It’s agile and perfectly functional. I tested other methods, which said they were more agile in Java and, at least for me, were slower than the one…
-
1
votes1
answer106
viewsA: Setting up the Xamarin
In Visual Studio 2017 the options for creating a project changed a little. If you are not using VS2017 I recommend you download it and use it. Since you are starting, it is best to start the right…
-
1
votes1
answer85
viewsA: Operation Async how to know when completed?
Utilize Task and await in its asynchronous methods. You need to add the following reference at the top of your class (using): using System.Threading.Tasks; I modified one of your methods as an…
-
0
votes1
answer318
viewsA: 'Resource.String' Does not contain a definition for 'gcm_defaultSenderId' Xamarin
This error occurs when you try to use a string that was not created in the Strings.xml file. Inside the root of your project, log into the Resources/values folder and open the Strings.xml file. If…
-
0
votes1
answer155
viewsA: Is it possible to import an XML file with an interest in replacing XAML?
Do not confuse XAML with AXML. AXML is a name given to Android Studio layout XML files in Visual Studio. An AXML file has XML inside it. A XAML file is a layout file as well, but used in Xamarin…
-
0
votes1
answer30
viewsA: Receiving items from a feed - Xamarin
Two things to observe here: His method is asynchronous (async) then for best result, you should expect the result of it through an operator called await. Your method returns a list of Feeditem then…
-
0
votes2
answers186
viewsA: Page orientation in the Xamarin
You have to add one Scrollview on your Page. Put the code you want to scroll inside the tag Scrollview. Below is an example with your code: <StackLayout> <ScrollView> <StackLayout>…
-
0
votes1
answer36
viewsA: Is it necessary to add Microsoft.net.http? monoAndroid?
Yes, you need to add a package, but you are trying to add the wrong package. The name of the package is System.Net.Http 1. Adding the package Right-click on the References of your project and select…
-
3
votes2
answers588
viewsA: How to open the Mainpage.axml of a Xamarin Project in Designer mode?
Answering your question/quote: Yes, in short, in Xamarin.Forms you write the layout (View) of your screens and the logic of the application only once (in your case, within App1) and the native…