Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free

.NET posts

  • By Niels Swimberghe
    Building Real-Time Applications with Blazor Server and Firestore blazor-server-firestore.png

    Blazor is a framework for building interactive client-side user interfaces for web applications using .NET. Using Blazor, .NET developers can build stylish and performant web interfaces using C# and ASP.NET Core instead of JavaScript. [Pause for applause.]

    Blazor Server provides support for hosting Razor components on a server in an ASP.NET Core app. At runtime, the Blazor Server app sends UI events from the browser to the server and applies UI updates sent from the server to the rendered component.

    Blazor Server is built on SignalR, which is built on websockets. Among things, websockets enable Blazor Server to push changes from the server to the browser at any time. You can build real time UIs when you combine this with a real-time database such as Google Firestore.

    Firestore is Google Firebase's real-time database offering on the Google Cloud Platform (GCP). Google provides .NET libraries for interacting with …

    Read More
  • By Jeff Rosenthal
    Introducing Windows Presentation Foundation (WPF) Animations wpf-animations.png

    When it comes to web pages, HTML is the tool to present the elements and CSS to provide the styling. Sure, there are exceptions and embellishments but, in short, that is how it boils down. If you want to implement some sort of animation or have something move, and it’s more complex than the simple animations supported by CSS, you generally have to fall back on JavaScript. In contrast, these aspects of presentation, styling, and animation are all an integral part of the Windows Presentation Foundation XAML.

    XAML stands for Extensible Application Markup Language, and it is a declarative language that describes WPF’s elements, relationships, and behaviors. XAML elements map directly to Common Language Runtime (CLR) object instances and XAML attributes correspond to the properties and events of CLR objects.

    In this tutorial, you will explore the various ways to animate visual elements in …

    Read More
  • By Jeff Rosenthal
    Understanding Windows Presentation Foundation (WPF) Data Binding with the DataContext Class In .NET Core wpf-datacontext.png

    The Windows Presentation Foundation (WPF) framework allows you to develop desktop applications with amazing graphic capabilities, but it does not stop there. An application needs to display data of some sort and connecting UIElements to underlying data structures needs to be flexible. That is where DataContext comes into play.

    DataContext works hand-in-hand with data binding to provide hierarchical data presentation. It is what connects the front end to the code-behind and enables changes made to data in the user interface to update the data source, and conversely, while maintaining the order of your data structure. You’ll see  examples of this in the case study project for this post.

    This tutorial will guide you through building a WPF application where you can explore DataContext at work. You will create a data dashboard that visualizes data from different simulated sources.


    You’ll need the following tools and resources to build and run …

    Read More
  • By Jeff Rosenthal
    Understanding Windows Presentation Foundation Routed Events In .NET Core wpf-routed-events.png

    Windows Presentation Foundation (WPF) is a very powerful framework for building desktop applications. Unlike Windows Forms, WPF provides the capabilities of nested UIElements, animation, layered presentation, and more. The focus of this tutorial is to demonstrate the aspects of Routed Events.

    Routed Events are a construct specific to WPF that supports event routing. It allows for the processing of events in a very flexible fashion to meet a particular capability.

    User interface elements (UIElements) have the ability to nest elements. A panel can contain a button which can contain a panel. Within that panel could be an image and some text. The user then clicks the mouse button. What element is expected to handle the event? Is it the text or the image? It could even be the panel that holds them or the button itself.

    A common practice is to add a mouse click handler for a …

    Read More
  • By David Pine
    Building a Video Chat Web App with ASP.NET Core Blazor and Twilio Programmable Video asp-net-core-blazor-video-chat-app.png

    Realtime user interaction is a great way to enhance the communication and collaboration capabilities of a web application. Video chatting with colleagues, friends, or family has become the new norm, and video chat is an obvious choice for sales, customer support, and education sites. For remote workforces, video chat improves the effectiveness of team collaboration.

    But is video chat practical to implement?

    If you’re developing with Blazor WebAssembly (WASM) on the front end and ASP.NET Core for your server, the answer is: Yes. Twilio Programmable Video and the Twilio helper libraries for JavaScript and .NET enable you to efficiently add robust video chat to your application.

    Whether you’re building solutions for telemedicine, distance learning, or workforce engagement, Twilio has GDPR compliance and HIPAA eligibility. With Twilio Programmable Video you can build secure video applications that scale.

    In this post you’ll learn how to create a fully operational video chat application …

    Read More
  • By AJ Saulsberry
    Getting Started With 2FA Using Twilio Authy and ASP.NET Core authy-asp-net-core-angularjs.png

    Update October 2020

    For new development, we encourage you to use the Verify API instead of the Authy API. The Verify API is an evolution of the Authy API with continued support for SMS, voice, and email one-time passcodes, an improved developer experience and new features including:

    This blog post uses the Authy API. The Authy API will continue to be maintained, but any new features and development will be on the Verify API. Check out the FAQ for more information and Verify API Reference to get started.

    Security is important, just ask any blue check Twitter user. Rolling your own authentication system is time consuming and fraught with peril. So how do you move beyond user credentials that consist of nothing more than an email …

    Read More
  • By AJ Saulsberry
    Using Twilio Lookup in .NET Core WPF Applications using-lookup-dot-net-wpf (1).png

    There are a lot — really a lot — of applications collecting phone numbers. Those numbers all need to be validated and verified. It makes sense to do some of the validation on the front end where an end user or customer service agent can correct errors without waiting on a round trip to a server.

    Application front-ends can determine if the contents of a specific field are “phone number-ish” by using data types, regular expressions, input masks, and odd bits of JavaScript. But they can’t tell if the input is a real phone number without checking the input against a list of real phone numbers.

    Twilio Lookup makes it easy to validate phone numbers for both web applications and applications developed with .NET Core Windows Presentation Foundation (WPF), an open-source UI framework for creating desktop client applications for Windows.

    Twilio provides helper libraries for a variety of programming languages …

    Read More
  • By Luce Carter
    Using Data Binding in Xamarin Applications using-data-binding-in-xamarin.png

    Xamarin is a powerful tool for building cross platform apps for Android and iOS devices. You can use Xamarin without leaving the comfort of your Visual Studio development environment and you don’t have to buy and connect a bunch of mobile phones to test your apps: Xamarin includes emulators to give you a real feel for how your user interface will look and work.

    One of the time-saving and powerful aspects of Xamarin is Xamarin.Forms, a toolkit for building user interfaces with eXtensible Application Markup Language (XAML) to define how a user interface component in a Xamarin app will look and behave. Xamarin XAML (try saying that five times fast) works in concert with code-behind C# classes, a structure you may be familiar with if you’ve worked with ASP.NET or ASP.NET Core.

    Xamarin.Forms includes Data Binding, a way of keeping a user interface synchronized with its underlying data without …

    Read More
  • By Mitchel Sellers
    Unit Testing Twilio Programmable SMS in .NET Core with xUnit, Moq, and Visual Studio 2019 unit-testing-sms-xunit-moq.png

    Testing your C# code is important, and it’s even more important when your code relies on external services. Writing tests will not only help you catch bugs, it will help you write better code by thinking about factors that affect the structure and resilience of your software.

    Visual Studio 2019 includes some great tools for creating and running unit tests, and you can put them to work without a lot of setup or configuration. Whether you’re writing a new app or trying to improve a brownfield program, it’s easy to integrate unit testing into your workflow.

    Twilio understands the importance of testing and provides resources for you to use when you’re creating unit tests for code that interacts with Twilio products, like Programmable SMS. To show you how easy it is to get started, this post will walk you through the process of building and testing a .NET Core console …

    Read More
  • By AJ Saulsberry
    Building Hierarchical Dropdown Lists in ASP.NET Core 3.1 Razor Pages with View Models and Ajax asp-net-core-razor-pages-dropdowns.png

    Dropdown lists are one of the most widely used user interface controls. It’s also common for the options presented in a dropdown to depend on the value of another control. Finding a good way to build this functionality is a challenge developers often face when beginning to build websites with ASP.NET Core.

    You can build hierarchical dropdown lists using ASP.NET Core Razor Pages using an Ajax call on the page view and an action method on the page model. It doesn’t require writing a lot of code, and the technique can be applied in numerous situations where user interface data needs to be set dynamically. No JavaScript frameworks required!

    Using Razor Pages with the Model-View-ViewModel (MVVM) design pattern provides a way of separating the presentation of data in the Razor Page, the view, from the structure of the data that is presented and manipulated by business logic, the view model. …

    Read More
  • Newer
    Sign up and start building
    Not ready yet? Talk to an expert.