2017-02-09 28 views
2

是否可以在Microsoft bot框架中的英雄卡按鈕上有自定義css樣式表。在ms英雄卡按鈕上自定義css樣式botframework

這裏是我的代碼

string ImagePath = "file:\\" + HttpContext.Current.Request.MapPath("\\Images\\Like-icon_resize.png"); 
      string strStyle = "<style type=\"text/css\" rel=\"stylesheet\">" + 
        @"{ 
         color:Red; 
         }      
        </style>"; 

List<CardAction> cardButtons = new List<CardAction>(); 
CardAction button = new CardAction() 
{ 
    Value = "like", 
    Type = ActionTypes.PostBack, 
    Image = strlike, 
    Title = strStyle 
}; 
cardButtons.Add(plButton); 

HeroCard hero = new HeroCard() 
{ 
     Text= "I'm a hero card", 
     Buttons = cardButtons 
}; 

,並顯示爲snapshot

回答

0

據我所知,HTML \ CSS是不是在BOT框架的支持,因爲它需要支持多種通信渠道,大多數渠道不提供HTML支持。您只能使用框架提供給您的控件(如圖片)