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

Weather Card

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

  • Temperature
  • Humidity
  • Dew
  • Pressure
  • Wind

Example 1: Defining a WeatherCard

 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("/Images/London.png", UriKind.RelativeOrAbsolute)); 
        weatherCardMessage.Pressure = "1008.00 mb"; 
        weatherCardMessage.Temperature = "9 °C"; 
        weatherCardMessage.Wind = "Wind: 0 mph from W"; 
 
        weatherCardMessage.SubTitle = "Partly cloudy"; 
 
        weatherCardMessage.Text = "Local Time: " + DateTime.Now.ToString("hh:mm tt"); 
        weatherCardMessage.Title = "London, UK"; 
 
        this.chat.AddMessage(weatherCardMessage); 
Defining such WeatherCardMessage will look as follows.

Figure 1: Defining WeatherCard

Defining ImageCard

See Also

In this article