New to Telerik UI for WinUI? Download free 30-day trial

Weather Card

The WeatherCard extends ImageCard by adding options to display weather data. The following set of properties is exposed for this purpose. They are all of the type of string.

  • Temperature
  • Humidity
  • Dew
  • Pressure
  • Wind

Defining a WeatherCardMessage

WeatherCardMessage weatherCardMessage = new WeatherCardMessage(this.currentAuthor); 
weatherCardMessage.ActionResultsOrientation = Orientation.Vertical; 
weatherCardMessage.CardOrientation = CardOrientation.Portrait; 
weatherCardMessage.Dew = "6° C"; 
weatherCardMessage.Humidity = "81 %"; 
weatherCardMessage.ImageSource = new BitmapImage(new Uri("ms-appx:///MyImage.png", UriKind.Absolute)); 
weatherCardMessage.Pressure = "1008.00 mb"; 
weatherCardMessage.Temperature = "34 °C"; 
weatherCardMessage.Wind = "Wind: 0 mph from W"; 
 
weatherCardMessage.SubTitle = "Sunny"; 
 
weatherCardMessage.Text = "Local Time: " + DateTime.Now.ToString("hh:mm tt"); 
weatherCardMessage.Title = "Las Vegas, USA"; 
 
this.chat.AddMessage(weatherCardMessage); 
RadChat with a WeatherCardMessage

RadChat with a WeatherCardMessage

In this article
Not finding the help you need?